Author Posts

June 17, 2016 at 4:39 pm

I am trying to build a script that downloads text files via SFTP from a remote site. There are always going to be multiple text files and I only want it to grab and pull down those text files. It connects, but it does not download the files where I need them.

try
{
    $logpath = "D:\Report-Copy-Move\Logs\CDCFH-demo_download_results.txt"

   #Source Folders, use absolute path
   #These folders must only have files that are to be downloaded
    $CDCFH_IN = "/username/RDA/IN/CC/MS4/DEM/"
        
   #Target Folders, use absolute path
    $CDCFH_OUT = "\\transferserver\dignity-billing\agch_fhmc\"
        
   #Archive Folder Location, use absolute path
    #$CDCFH_Archive = "D:\ininbound\ftp-archive\cdc-archive\"
        
   #Load WinSCP .NET assembly
    Add-Type -Path "WinSCPnet.dll"
 
   #Setup session options
    $sessionOptions = New-Object WinSCP.SessionOptions
    $sessionOptions.Protocol = [WinSCP.Protocol]::sftp
    $sessionOptions.HostName = "mft.dignityhealth.org"
    $sessionOptions.UserName = "username"
    $sessionOptions.Password = "password"
    $sessionOptions.PortNumber = "xxxx"
    
   #Use the following line with the SSH HostKey Fingerprint by replacing the xx:xx:xx...
    $sessionOptions.SshHostKeyFingerprint = "ssh-rsa 1024 97:83:f1:ec:8c:c4:3b:78:29:d9:c5:10:c8:fe:93:08"

    
   #ONLY FOR TEST PURPOSES, DO NOT USE AS IS
   #$sessionOptions.GiveUpSecurityAndAcceptAnySshHostKey = true
   #$sessionOptions.GiveUpSecurityAndAcceptAnyTlsHostCertificate = true
    
    $session = New-Object WinSCP.Session
    $session.SessionLogPath = "D:\Report-Copy-Move\Logs\CDCFH-demo_download-session-log.txt"  
 
    try
    {
       #Connect
        $session.Open($sessionOptions)
 
       #Force binary mode transfer
        $transferOptions = New-Object WinSCP.TransferOptions
        $transferOptions.TransferMode = [WinSCP.TransferMode]::Binary

       #$transferOptions.ResumeSupport.State = [WinSCP.TransferResumeSupportState]::Off
        $transferOptions.FilePermissions = $Null # This is default
        $transferOptions.PreserveTimestamp = $False
 
       #Upload file to the SFTP server directory     
       #Note use of absolute path
        $transferResult_CDCFH = $session.GetFiles($CDCFH_IN, $CDCFH_OUT, $False, $transferOptions)
                
       #Throw on any error to emulate "option batch abort"
        $transferResult_CDCFH.Check()
                
       #Printing output for CDC and FH
        $cdcfh_counter = 0
        foreach ($transfer in $transferResult_CDCFH.Transfers)
        {
            #Success or error?
            if ($transfer.Error -eq $Null)
            {
                #Print results
                Add-content -Path $logpath -value "Download of {0} succeeded $($transfer.FileName)"
                $cdcfh_counter++

                #Upload succeeded, delete source files
                Remove-Item $transfer.FileName $CDCFH_IN
            }
            else
            {
                #Upload Failed, throw error
                Add-content -Path $logpath -value "Upload failed: {1} $($transfer.FileName) $($transfer.Error.Message)"
            }
        }

        Add-content -Path $logPath -value "$($cdcfh_counter) files successfully downloaded from DIGNITY."
                        
    }
    finally
    {
       #Disconnect, clean up
        $session.Dispose()
        Add-content -Path $logpath -value "Download of Dignity demographics completed"
    }
 
    exit 0
}
catch [Exception]
{
    Add-content -path $logpath -value $_.Exception.Message
    exit 1
}
  • This topic was modified 2 years, 2 months ago by  Don Jones.

June 18, 2016 at 1:50 pm

Note that the PRE tags use angle brackets, as indicated in the short bullet list right above the posting textbox. I've edited your post to correct that.

I honestly don't know anything about WinSCP. They have a site at https://winscp.net/eng/download.php, and it might be helpful to post in their Support forums.

June 20, 2016 at 7:31 pm

Thanks. I appreciate the research time. I will check with WinSCP. I did look in to the SFTP Add On for Powershell, but I can't seem to get the syntax right for it to do anything!

June 28, 2016 at 6:51 pm

Hello. I feel I'm close! I still need help. I'm also researching with WinSCP, but now I'm stuck. The script connects, downloads, but I still cannot get it to delete the remote files. I can delete manually and it prompts and I click YES. However the script just won't delete the remote text files. What am I missing? Here's the script and log file attached too below it.

#06/15/2016 Created to download demographic files from Dignity via SFTP
#
try
{
    $logpath = "D:\Report-Copy-Move\Logs\CDCFH-demo_download_results.txt"

   #Source Folders, use absolute path
   #These folders must only have files that are to be transferred
    $CDCFH_IN = "/username/RDA/IN/CC/MS4/DEM/"
        
   #Target Folders, use absolute path
    $CDCFH_OUT = "\\transferserver\dignity-billing\agch_fhmc\*.txt"
        
   #Archive Folder Location, use absolute path
    #$CDCFH_Archive = "D:\ininbound\ftp-archive\cdc-archive\"
        
   #Load WinSCP .NET assembly
    Add-Type -Path "D:\Report-Copy-Move\SFTP\WinSCPnet.dll"
 
   #Setup session options
    $sessionOptions = New-Object WinSCP.SessionOptions
    $sessionOptions.Protocol = [WinSCP.Protocol]::sftp
    $sessionOptions.HostName = "mft.dignityhealth.org"
    $sessionOptions.UserName = "username"
    $sessionOptions.Password = "pa55w0rd"
    $sessionOptions.PortNumber = "4022"
    
   #Use the following line with the SSH HostKey Fingerprint by replacing the xx:xx:xx...
    $sessionOptions.SshHostKeyFingerprint = "ssh-rsa 1024 97:83:f1:ec:8c:c4:3b:78:29:d9:c5:10:c8:fe:93:08"

    
   #ONLY FOR TEST PURPOSES, DO NOT USE AS IS
   #$sessionOptions.GiveUpSecurityAndAcceptAnySshHostKey = true
   #$sessionOptions.GiveUpSecurityAndAcceptAnyTlsHostCertificate = true
    
    $session = New-Object WinSCP.Session
    $session.SessionLogPath = "D:\Report-Copy-Move\Logs\CDCFH-demo_download-session-log.txt"  
 
    try
    {
       #Connect
        $session.Open($sessionOptions)
 
       #Force binary mode transfer
        $transferOptions = New-Object WinSCP.TransferOptions
        $transferOptions.TransferMode = [WinSCP.TransferMode]::Binary

       #$transferOptions.ResumeSupport.State = [WinSCP.TransferResumeSupportState]::Off
        $transferOptions.FilePermissions = $Null # This is default
        $transferOptions.PreserveTimestamp = $False
 
       #Upload file to the SFTP server directory     
       #Note use of absolute path
        $transferResult_CDCFH = $session.GetFiles($CDCFH_IN, $CDCFH_OUT, $False, $transferOptions)
		                
       #Throw on any error to emulate "option batch abort"
        $transferResult_CDCFH.Check()
                
       #Printing output for CDC and FH
        $cdcfh_counter = 0
        foreach ($transfer in $transferResult_CDCFH.Transfers)
        {
            #Success or error?
            if ($transfer.Error -eq $Null)
            {
                #Print results
                Add-content -Path $logpath -value "Download of {0} succeeded $($transfer.FileName)"
                $cdcfh_counter++

            #Upload succeeded, delete source files
			# Get list of files in the directory
            $directoryInfo = $session.ListDirectory($CDCFH_IN)
 
            # Select files matching wildcard
            $files =
            $directoryInfo.Files |
            Where-Object { $_.Name -eq "*.txt"}
 
            # Any file matched?
            if ($files)
            {
            foreach ($fileInfo in $files)
            {
               # Remove-Item $transfer.FileName $CDCFH_IN
               Get-ChildItem * -Include *.txt -Recurse | Remove-Item
               #Remove-Item -path $CDCFH_IN -Recurse
                      }
        }
        else
        {
             Add-content -Path $logpath ("No files matching {0} found" -f $wildcard)
        }
                }
            else
            {
                #Upload Failed, throw error
                Add-content -Path $logpath -value "Upload failed: {1} $($transfer.FileName) $($transfer.Error.Message)"
            }
        }

        Add-content -Path $logPath -value "$($cdcfh_counter) files successfully downloaded from DIGNITY."
                        
    }
    finally
    {
       #Disconnect, clean up
        $session.Dispose()
        Add-content -Path $logpath -value "Download of Dignity demographics completed"
    }
 
    exit 0
}
catch [Exception]
{
    Add-content -path $logpath -value $_.Exception.Message
    exit 1
}

LOG FILE:

. 2016-06-28 10:43:48.430 ————————————————————————–
. 2016-06-28 10:43:48.430 WinSCP Version 5.7.4 (Build 5553) (OS 6.1.7601 Service Pack 1 – Windows Server 2008 R2 Standard)
. 2016-06-28 10:43:48.430 Configuration: nul
. 2016-06-28 10:43:48.430 Log level: Normal
. 2016-06-28 10:43:48.430 Local account: RA-SLO\Administrator
. 2016-06-28 10:43:48.430 Working directory: D:\Report-Copy-Move\SFTP
. 2016-06-28 10:43:48.430 Process ID: 3536
. 2016-06-28 10:43:48.430 Command-line: "D:\Report-Copy-Move\SFTP\winscp.exe" /xmllog="C:\Users\administrator.RA-SLO.000\AppData\Local\Temp\wscp0808.01DD9C86.tmp" /xmlgroups /nointeractiveinput /dotnet=574 /ini=nul /log="D:\Report-Copy-Move\Logs\CDCFH-demo_download-session-log.txt" /console /consoleinstance=_2056_44321065_647
. 2016-06-28 10:43:48.430 Time zone: Current: GMT-7, Standard: GMT-8 (Pacific Standard Time), DST: GMT-7 (Pacific Daylight Time), DST Start: 3/13/2016, DST End: 11/6/2016
. 2016-06-28 10:43:48.430 Login time: Tuesday, June 28, 2016 10:43:48 AM
. 2016-06-28 10:43:48.430 ————————————————————————–
. 2016-06-28 10:43:48.430 Script: Retrospectively logging previous script records:
> 2016-06-28 10:43:48.430 Script: option batch on
< 2016-06-28 10:43:48.430 Script: batch on 2016-06-28 10:43:48.430 Script: option confirm off 2016-06-28 10:43:48.430 Script: option reconnecttime 120 2016-06-28 10:43:48.430 Script: open sftp://username:***@mft.dignityhealth.org:4022 -hostkey="ssh-rsa 1024 97:83:f1:ec:8c:c4:3b:78:29:d9:c5:10:c8:fe:93:08" -timeout=15 . 2016-06-28 10:43:48.430 ————————————————————————– . 2016-06-28 10:43:48.430 Session name: username@mft.dignityhealth.org (Ad-Hoc site)
. 2016-06-28 10:43:48.430 Host name: mft.dignityhealth.org (Port: 4022)
. 2016-06-28 10:43:48.430 User name: username (pa55w0rd: Yes, Key file: No)
. 2016-06-28 10:43:48.430 Tunnel: No
. 2016-06-28 10:43:48.430 Transfer Protocol: SFTP
. 2016-06-28 10:43:48.430 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2016-06-28 10:43:48.430 Disable Nagle: No
. 2016-06-28 10:43:48.430 Proxy: none
. 2016-06-28 10:43:48.430 Send buffer: 262144
. 2016-06-28 10:43:48.430 SSH protocol version: 2; Compression: No
. 2016-06-28 10:43:48.430 Bypass authentication: No
. 2016-06-28 10:43:48.430 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2016-06-28 10:43:48.430 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2016-06-28 10:43:48.430 KEX: dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN
. 2016-06-28 10:43:48.430 SSH Bugs: A,A,A,A,A,A,A,A,A,A,A
. 2016-06-28 10:43:48.430 Simple channel: Yes
. 2016-06-28 10:43:48.430 Return code variable: Autodetect; Lookup user groups: A
. 2016-06-28 10:43:48.430 Shell: default
. 2016-06-28 10:43:48.430 EOL: 0, UTF: 2
. 2016-06-28 10:43:48.430 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2016-06-28 10:43:48.430 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2016-06-28 10:43:48.430 SFTP Bugs: A,A
. 2016-06-28 10:43:48.430 SFTP Server: default
. 2016-06-28 10:43:48.430 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2016-06-28 10:43:48.430 Cache directory changes: Yes, Permanent: Yes
. 2016-06-28 10:43:48.430 DST mode: 1
. 2016-06-28 10:43:48.430 ————————————————————————–
. 2016-06-28 10:43:48.430 Looking up host "mft.dignityhealth.org"
. 2016-06-28 10:43:48.493 Connecting to 162.135.7.94 port 4022
. 2016-06-28 10:43:48.540 Server version: SSH-2.0-Maverick_SSHD
. 2016-06-28 10:43:48.540 Using SSH protocol version 2
. 2016-06-28 10:43:48.540 We claim version: SSH-2.0-WinSCP_release_5.7.4
. 2016-06-28 10:43:48.571 Doing Diffie-Hellman group exchange
. 2016-06-28 10:43:48.633 Doing Diffie-Hellman key exchange with hash SHA-1
. 2016-06-28 10:43:48.743 Verifying host key rsa2 0x10001,0xcfe09bf17110d378 042f6f74989b8b67 db6db09809620875 842240e7358b5d1a 3d4b6b64c1101420 be1928cb51eb6449 6820e34f545d2b11 c34883cb11d81e9a 5f84d1e611eac956 fc773ea7f3bfe982 22d1095d29e3dcfb 6961222be579df7b 7d1e0d6e2795501c 0c8952715961410f 415584815f5e41a3 104ffa5564d123bd with fingerprint ssh-rsa 1024 97:83:f1:ec:8c:c4:3b:78:29:d9:c5:10:c8:fe:93:08
. 2016-06-28 10:43:48.743 Host key matches configured key
. 2016-06-28 10:43:48.743 Host key fingerprint is:
. 2016-06-28 10:43:48.743 ssh-rsa 1024 97:83:f1:ec:8c:c4:3b:78:29:d9:c5:10:c8:fe:93:08
. 2016-06-28 10:43:48.743 Initialised AES-256 SDCTR client->server encryption
. 2016-06-28 10:43:48.743 Initialised HMAC-SHA1 client->server MAC algorithm
. 2016-06-28 10:43:48.743 Initialised AES-256 SDCTR server->client encryption
. 2016-06-28 10:43:48.743 Initialised HMAC-SHA1 server->client MAC algorithm
! 2016-06-28 10:43:48.789 Using username "username".
. 2016-06-28 10:43:48.821 Prompt (pa55w0rd, "SSH pa55w0rd", , "&pa55w0rd: ")
. 2016-06-28 10:43:48.821 Using stored pa55w0rd.
. 2016-06-28 10:43:48.821 Sent pa55w0rd
. 2016-06-28 10:43:48.867 Access granted
. 2016-06-28 10:43:48.867 Opening session as main channel
. 2016-06-28 10:43:48.899 Opened main channel
. 2016-06-28 10:43:48.961 Started a shell/command
. 2016-06-28 10:43:48.961 ————————————————————————–
. 2016-06-28 10:43:48.961 Using SFTP protocol.
. 2016-06-28 10:43:48.961 Doing startup conversation with host.
> 2016-06-28 10:43:48.961 Type: SSH_FXP_INIT, Size: 5, Number: -1
2016-06-28 10:43:48.977 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2016-06-28 10:43:49.008 Type: SSH_FXP_NAME, Size: 63, Number: 16 . 2016-06-28 10:43:49.008 Real path is '/username' . 2016-06-28 10:43:49.008 Startup conversation with host finished. 2016-06-28 10:43:49.398 Script: pwd 2016-06-28 10:43:49.476 Script: get -nopermissions -nopreservetime -transfer="binary" — "/username/RDA/IN/CC/MS4/DEM/" "\\transferserver\dignity-billing\agch_fhmc\*.txt" . 2016-06-28 10:43:49.476 Listing file "/username/RDA/IN/CC/MS4/DEM". > 2016-06-28 10:43:49.476 Type: SSH_FXP_LSTAT, Size: 38, Number: 263
2016-06-28 10:43:49.507 Type: SSH_FXP_OPENDIR, Size: 38, Number: 523
2016-06-28 10:43:49.539 Type: SSH_FXP_READDIR, Size: 30, Number: 780
2016-06-28 10:43:49.570 Type: SSH_FXP_READDIR, Size: 30, Number: 1036
< 2016-06-28 10:43:49.601 Type: SSH_FXP_STATUS, Size: 40, Number: 1036 2016-06-28 10:43:49.601 Type: SSH_FXP_CLOSE, Size: 30, Number: 1284 . 2016-06-28 10:43:49.601 .working;d;0;2016-06-28T12:15:21.000Z;"0" [0];"0" [0];r–r–r–;2 . 2016-06-28 10:43:49.601 A-06_28_16-05_00_23.txt;-;29780;2016-06-28T12:15:12.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:49.601 F-06_28_16-05_00_03.txt;-;151535;2016-06-28T12:15:21.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:49.601 2222.txt;-;25296;2016-06-28T15:01:35.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:49.601 2223.txt;-;129450;2016-06-28T15:01:36.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:49.601 File: '/username/RDA/IN/CC/MS4/DEM/.working' [2016-06-28T12:15:21.000Z] [0] . 2016-06-28 10:43:49.601 Listing directory "/username/RDA/IN/CC/MS4/DEM/.working". > 2016-06-28 10:43:49.601 Type: SSH_FXP_OPENDIR, Size: 47, Number: 1547
< 2016-06-28 10:43:49.617 Type: SSH_FXP_STATUS, Size: 40, Number: 1284 . 2016-06-28 10:43:49.617 Discarding reserved response 2016-06-28 10:43:49.648 Type: SSH_FXP_READDIR, Size: 30, Number: 1804 < 2016-06-28 10:43:49.663 Type: SSH_FXP_STATUS, Size: 40, Number: 1804 2016-06-28 10:43:49.663 Type: SSH_FXP_LSTAT, Size: 50, Number: 2055 2016-06-28 10:43:49.695 Type: SSH_FXP_CLOSE, Size: 30, Number: 2308 . 2016-06-28 10:43:49.695 ..;D;0;2016-06-28T15:01:36.000Z;"" [0];"" [0];rw-rw-rw-;1 . 2016-06-28 10:43:49.695 File: '/username/RDA/IN/CC/MS4/DEM/A-06_28_16-05_00_23.txt' [2016-06-28T12:15:12.000Z] [29780] . 2016-06-28 10:43:49.695 Copying "/username/RDA/IN/CC/MS4/DEM/A-06_28_16-05_00_23.txt" to local directory started. . 2016-06-28 10:43:49.695 Binary transfer mode selected. . 2016-06-28 10:43:49.695 Opening remote file. > 2016-06-28 10:43:49.695 Type: SSH_FXP_OPEN, Size: 70, Number: 2563
< 2016-06-28 10:43:49.726 Type: SSH_FXP_STATUS, Size: 40, Number: 2308 . 2016-06-28 10:43:49.726 Discarding reserved response 2016-06-28 10:43:49.788 Type: SSH_FXP_FSTAT, Size: 31, Number: 2824 2016-06-28 10:43:49.819 Type: SSH_FXP_READ, Size: 43, Number: 3077 2016-06-28 10:43:49.913 Type: SSH_FXP_CLOSE, Size: 31, Number: 5892 < 2016-06-28 10:43:49.929 Type: SSH_FXP_STATUS, Size: 28, Number: 5125 < 2016-06-28 10:43:49.975 Type: SSH_FXP_STATUS, Size: 28, Number: 5381 2016-06-28 10:43:49.975 Type: SSH_FXP_OPEN, Size: 70, Number: 6147 < 2016-06-28 10:43:49.975 Type: SSH_FXP_STATUS, Size: 40, Number: 5892 . 2016-06-28 10:43:49.975 Discarding reserved response 2016-06-28 10:43:50.054 Type: SSH_FXP_FSTAT, Size: 30, Number: 6408 2016-06-28 10:43:50.085 Type: SSH_FXP_READ, Size: 42, Number: 6661 2016-06-28 10:43:50.210 Type: SSH_FXP_CLOSE, Size: 30, Number: 8964 < 2016-06-28 10:43:50.210 Type: SSH_FXP_STATUS, Size: 28, Number: 8197 < 2016-06-28 10:43:50.225 Type: SSH_FXP_STATUS, Size: 28, Number: 8453 2016-06-28 10:43:50.272 Type: SSH_FXP_OPEN, Size: 55, Number: 9219 < 2016-06-28 10:43:50.272 Type: SSH_FXP_STATUS, Size: 40, Number: 8964 . 2016-06-28 10:43:50.272 Discarding reserved response 2016-06-28 10:43:50.334 Type: SSH_FXP_FSTAT, Size: 30, Number: 9480 2016-06-28 10:43:50.366 Type: SSH_FXP_READ, Size: 42, Number: 9733 2016-06-28 10:43:50.428 Type: SSH_FXP_CLOSE, Size: 30, Number: 10244 . 2016-06-28 10:43:50.444 Transfer done: '/username/RDA/IN/CC/MS4/DEM/2222.txt' [25296] . 2016-06-28 10:43:50.444 File: '/username/RDA/IN/CC/MS4/DEM/2223.txt' [2016-06-28T15:01:36.000Z] [129450] . 2016-06-28 10:43:50.444 Copying "/username/RDA/IN/CC/MS4/DEM/2223.txt" to local directory started. . 2016-06-28 10:43:50.444 Binary transfer mode selected. . 2016-06-28 10:43:50.444 Checking existence of partially transfered file. . 2016-06-28 10:43:50.444 Opening remote file. > 2016-06-28 10:43:50.444 Type: SSH_FXP_OPEN, Size: 55, Number: 10499
< 2016-06-28 10:43:50.475 Type: SSH_FXP_STATUS, Size: 40, Number: 10244 . 2016-06-28 10:43:50.475 Discarding reserved response 2016-06-28 10:43:50.522 Type: SSH_FXP_FSTAT, Size: 29, Number: 10760 2016-06-28 10:43:50.553 Type: SSH_FXP_READ, Size: 41, Number: 11013 2016-06-28 10:43:50.647 Type: SSH_FXP_CLOSE, Size: 29, Number: 13060 < 2016-06-28 10:43:50.647 Type: SSH_FXP_STATUS, Size: 28, Number: 12293 < 2016-06-28 10:43:50.662 Type: SSH_FXP_STATUS, Size: 28, Number: 12549 2016-06-28 10:43:51.115 Script: ls — "/username/RDA/IN/CC/MS4/DEM/" . 2016-06-28 10:43:51.115 Listing directory "/username/RDA/IN/CC/MS4/DEM". > 2016-06-28 10:43:51.115 Type: SSH_FXP_OPENDIR, Size: 38, Number: 13323
< 2016-06-28 10:43:51.115 Type: SSH_FXP_STATUS, Size: 40, Number: 13060 . 2016-06-28 10:43:51.115 Discarding reserved response 2016-06-28 10:43:51.146 Type: SSH_FXP_READDIR, Size: 31, Number: 13580 2016-06-28 10:43:51.177 Type: SSH_FXP_READDIR, Size: 31, Number: 13836 < 2016-06-28 10:43:51.193 Type: SSH_FXP_STATUS, Size: 40, Number: 13836 2016-06-28 10:43:51.193 Type: SSH_FXP_CLOSE, Size: 31, Number: 14084 . 2016-06-28 10:43:51.208 .working;d;0;2016-06-28T12:15:21.000Z;"0" [0];"0" [0];r–r–r–;2 . 2016-06-28 10:43:51.208 A-06_28_16-05_00_23.txt;-;29780;2016-06-28T12:15:12.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:51.208 F-06_28_16-05_00_03.txt;-;151535;2016-06-28T12:15:21.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:51.208 2222.txt;-;25296;2016-06-28T15:01:35.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:51.208 2223.txt;-;129450;2016-06-28T15:01:36.000Z;"0" [0];"0" [0];rw-rw-rw-;1 < 2016-06-28 10:43:51.208 Script: dr–r–r– 1 0 0 4096 Jun 28 5:15:21 2016 .working < 2016-06-28 10:43:51.208 Script: -rw-rw-rw- 1 0 0 29780 Jun 28 5:15:12 2016 A-06_28_16-05_00_23.txt < 2016-06-28 10:43:51.208 Script: -rw-rw-rw- 1 0 0 151535 Jun 28 5:15:21 2016 F-06_28_16-05_00_03.txt < 2016-06-28 10:43:51.208 Script: -rw-rw-rw- 1 0 0 25296 Jun 28 8:01:35 2016 2222.txt 2016-06-28 10:43:51.302 Script: ls — "/username/RDA/IN/CC/MS4/DEM/" . 2016-06-28 10:43:51.302 Listing directory "/username/RDA/IN/CC/MS4/DEM". > 2016-06-28 10:43:51.302 Type: SSH_FXP_OPENDIR, Size: 38, Number: 14347
< 2016-06-28 10:43:51.302 Type: SSH_FXP_STATUS, Size: 40, Number: 14084 . 2016-06-28 10:43:51.302 Discarding reserved response 2016-06-28 10:43:51.318 Type: SSH_FXP_READDIR, Size: 29, Number: 14604 2016-06-28 10:43:51.349 Type: SSH_FXP_READDIR, Size: 29, Number: 14860 < 2016-06-28 10:43:51.380 Type: SSH_FXP_STATUS, Size: 40, Number: 14860 2016-06-28 10:43:51.380 Type: SSH_FXP_CLOSE, Size: 29, Number: 15108 . 2016-06-28 10:43:51.380 .working;d;0;2016-06-28T12:15:21.000Z;"0" [0];"0" [0];r–r–r–;2 . 2016-06-28 10:43:51.380 A-06_28_16-05_00_23.txt;-;29780;2016-06-28T12:15:12.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:51.380 F-06_28_16-05_00_03.txt;-;151535;2016-06-28T12:15:21.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:51.380 2222.txt;-;25296;2016-06-28T15:01:35.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:51.380 2223.txt;-;129450;2016-06-28T15:01:36.000Z;"0" [0];"0" [0];rw-rw-rw-;1 < 2016-06-28 10:43:51.380 Script: dr–r–r– 1 0 0 4096 Jun 28 5:15:21 2016 .working < 2016-06-28 10:43:51.380 Script: -rw-rw-rw- 1 0 0 29780 Jun 28 5:15:12 2016 A-06_28_16-05_00_23.txt < 2016-06-28 10:43:51.380 Script: -rw-rw-rw- 1 0 0 151535 Jun 28 5:15:21 2016 F-06_28_16-05_00_03.txt < 2016-06-28 10:43:51.380 Script: -rw-rw-rw- 1 0 0 25296 Jun 28 8:01:35 2016 2222.txt 2016-06-28 10:43:51.442 Script: ls — "/username/RDA/IN/CC/MS4/DEM/" . 2016-06-28 10:43:51.442 Listing directory "/username/RDA/IN/CC/MS4/DEM". > 2016-06-28 10:43:51.442 Type: SSH_FXP_OPENDIR, Size: 38, Number: 15371
< 2016-06-28 10:43:51.442 Type: SSH_FXP_STATUS, Size: 40, Number: 15108 . 2016-06-28 10:43:51.442 Discarding reserved response 2016-06-28 10:43:51.474 Type: SSH_FXP_READDIR, Size: 31, Number: 15628 2016-06-28 10:43:51.505 Type: SSH_FXP_READDIR, Size: 31, Number: 15884 < 2016-06-28 10:43:51.520 Type: SSH_FXP_STATUS, Size: 40, Number: 15884 2016-06-28 10:43:51.520 Type: SSH_FXP_CLOSE, Size: 31, Number: 16132 . 2016-06-28 10:43:51.520 .working;d;0;2016-06-28T12:15:21.000Z;"0" [0];"0" [0];r–r–r–;2 . 2016-06-28 10:43:51.520 A-06_28_16-05_00_23.txt;-;29780;2016-06-28T12:15:12.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:51.520 F-06_28_16-05_00_03.txt;-;151535;2016-06-28T12:15:21.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:51.520 2222.txt;-;25296;2016-06-28T15:01:35.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:51.520 2223.txt;-;129450;2016-06-28T15:01:36.000Z;"0" [0];"0" [0];rw-rw-rw-;1 < 2016-06-28 10:43:51.520 Script: dr–r–r– 1 0 0 4096 Jun 28 5:15:21 2016 .working < 2016-06-28 10:43:51.520 Script: -rw-rw-rw- 1 0 0 29780 Jun 28 5:15:12 2016 A-06_28_16-05_00_23.txt < 2016-06-28 10:43:51.520 Script: -rw-rw-rw- 1 0 0 151535 Jun 28 5:15:21 2016 F-06_28_16-05_00_03.txt < 2016-06-28 10:43:51.520 Script: -rw-rw-rw- 1 0 0 25296 Jun 28 8:01:35 2016 2222.txt 2016-06-28 10:43:51.583 Script: ls — "/username/RDA/IN/CC/MS4/DEM/" . 2016-06-28 10:43:51.583 Listing directory "/username/RDA/IN/CC/MS4/DEM". > 2016-06-28 10:43:51.583 Type: SSH_FXP_OPENDIR, Size: 38, Number: 16395
< 2016-06-28 10:43:51.583 Type: SSH_FXP_STATUS, Size: 40, Number: 16132 . 2016-06-28 10:43:51.583 Discarding reserved response 2016-06-28 10:43:51.614 Type: SSH_FXP_READDIR, Size: 30, Number: 16652 2016-06-28 10:43:51.645 Type: SSH_FXP_READDIR, Size: 30, Number: 16908 < 2016-06-28 10:43:51.661 Type: SSH_FXP_STATUS, Size: 40, Number: 16908 2016-06-28 10:43:51.661 Type: SSH_FXP_CLOSE, Size: 30, Number: 17156 . 2016-06-28 10:43:51.661 .working;d;0;2016-06-28T12:15:21.000Z;"0" [0];"0" [0];r–r–r–;2 . 2016-06-28 10:43:51.661 A-06_28_16-05_00_23.txt;-;29780;2016-06-28T12:15:12.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:51.661 F-06_28_16-05_00_03.txt;-;151535;2016-06-28T12:15:21.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:51.661 2222.txt;-;25296;2016-06-28T15:01:35.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-06-28 10:43:51.661 2223.txt;-;129450;2016-06-28T15:01:36.000Z;"0" [0];"0" [0];rw-rw-rw-;1 < 2016-06-28 10:43:51.661 Script: dr–r–r– 1 0 0 4096 Jun 28 5:15:21 2016 .working < 2016-06-28 10:43:51.661 Script: -rw-rw-rw- 1 0 0 29780 Jun 28 5:15:12 2016 A-06_28_16-05_00_23.txt < 2016-06-28 10:43:51.661 Script: -rw-rw-rw- 1 0 0 151535 Jun 28 5:15:21 2016 F-06_28_16-05_00_03.txt < 2016-06-28 10:43:51.661 Script: -rw-rw-rw- 1 0 0 25296 Jun 28 8:01:35 2016 2222.txt 2016-06-28 10:43:51.739 Script: exit . 2016-06-28 10:43:51.739 Script: Exit code: 0 . 2016-06-28 10:43:51.739 Closing connection. . 2016-06-28 10:43:51.739 Sending special code: 12 . 2016-06-28 10:43:51.739 Sent EOF message

June 28, 2016 at 7:01 pm

Are you sure the account you're connecting with has permissions to delete the remote files? Never hurts to triple-check.

September 15, 2016 at 5:50 pm

Yep. The account has all access. Manually I can download, delete, upload. It's just getting the script to do it for me has been the challenge.

September 15, 2016 at 5:58 pm

Hello. I have made progress with this Powershell script. It's using WinSCP in Powershell. I have it connecting to an SFTP site, download text files to a local share, it deletes the text files from the remote server, then disconnects. It writes two log files: a session log and a results log. However, the session log shows a code 3 error at the bottom. The results log is basically blank. It's not showing me the line by line details that I expect to be written in the "for each" loop. Here's the script below. The log files are here too at the end for review. What am I doing wrong? What am I missing?
<>

*** RESULTS LOG: ***
Download of Dignity Demographic Files Completed

*** SESSION LOG: ***
. 2016-09-14 15:00:40.396 ————————————————————————–
. 2016-09-14 15:00:40.396 WinSCP Version 5.7.4 (Build 5553) (OS 6.1.7601 Service Pack 1 – Windows Server 2008 R2 Standard)
. 2016-09-14 15:00:40.396 Configuration: nul
. 2016-09-14 15:00:40.396 Log level: Normal
. 2016-09-14 15:00:40.396 Local account: RA-SLO\administrator
. 2016-09-14 15:00:40.396 Working directory: D:\Report-Copy-Move\SFTP
. 2016-09-14 15:00:40.396 Process ID: 2712
. 2016-09-14 15:00:40.396 Command-line: "D:\Report-Copy-Move\SFTP\winscp.exe" /xmllog="C:\Users\administrator.RA-SLO.000\AppData\Local\Temp\2\wscp1218.0086EB81.tmp" /xmlgroups /nointeractiveinput /dotnet=574 /ini=nul /log="D:\Report-Copy-Move\Logs\DIGNITY-demo_download-session-log.txt" /console /consoleinstance=_4632_62350765_896
. 2016-09-14 15:00:40.396 Time zone: Current: GMT-7, Standard: GMT-8 (Pacific Standard Time), DST: GMT-7 (Pacific Daylight Time), DST Start: 3/13/2016, DST End: 11/6/2016
. 2016-09-14 15:00:40.396 Login time: Wednesday, September 14, 2016 3:00:40 PM
. 2016-09-14 15:00:40.396 ————————————————————————–
. 2016-09-14 15:00:40.396 Script: Retrospectively logging previous script records:
> 2016-09-14 15:00:40.396 Script: option batch on
< 2016-09-14 15:00:40.396 Script: batch on 2016-09-14 15:00:40.396 Script: option confirm off 2016-09-14 15:00:40.396 Script: option reconnecttime 120 2016-09-14 15:00:40.396 Script: open sftp://RDA_jkrupa:***@mft.dignityhealth.org:4022 -hostkey="ssh-rsa 1024 97:83:f1:ec:8c:c4:3b:78:29:d9:c5:10:c8:fe:93:08" -timeout=15 . 2016-09-14 15:00:40.396 ————————————————————————– . 2016-09-14 15:00:40.396 Session name: RDA_jkrupa@mft.dignityhealth.org (Ad-Hoc site)
. 2016-09-14 15:00:40.396 Host name: mft.dignityhealth.org (Port: 4022)
. 2016-09-14 15:00:40.396 User name: RDA_jkrupa (Password: Yes, Key file: No)
. 2016-09-14 15:00:40.396 Tunnel: No
. 2016-09-14 15:00:40.396 Transfer Protocol: SFTP
. 2016-09-14 15:00:40.396 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2016-09-14 15:00:40.396 Disable Nagle: No
. 2016-09-14 15:00:40.396 Proxy: none
. 2016-09-14 15:00:40.396 Send buffer: 262144
. 2016-09-14 15:00:40.396 SSH protocol version: 2; Compression: No
. 2016-09-14 15:00:40.396 Bypass authentication: No
. 2016-09-14 15:00:40.396 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2016-09-14 15:00:40.396 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2016-09-14 15:00:40.396 KEX: dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN
. 2016-09-14 15:00:40.396 SSH Bugs: A,A,A,A,A,A,A,A,A,A,A
. 2016-09-14 15:00:40.396 Simple channel: Yes
. 2016-09-14 15:00:40.396 Return code variable: Autodetect; Lookup user groups: A
. 2016-09-14 15:00:40.396 Shell: default
. 2016-09-14 15:00:40.396 EOL: 0, UTF: 2
. 2016-09-14 15:00:40.396 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2016-09-14 15:00:40.396 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2016-09-14 15:00:40.396 SFTP Bugs: A,A
. 2016-09-14 15:00:40.396 SFTP Server: default
. 2016-09-14 15:00:40.396 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2016-09-14 15:00:40.396 Cache directory changes: Yes, Permanent: Yes
. 2016-09-14 15:00:40.396 DST mode: 1
. 2016-09-14 15:00:40.396 ————————————————————————–
. 2016-09-14 15:00:40.396 Looking up host "mft.dignityhealth.org"
. 2016-09-14 15:00:40.411 Connecting to 162.135.7.94 port 4022
. 2016-09-14 15:00:40.458 Server version: SSH-2.0-Maverick_SSHD
. 2016-09-14 15:00:40.458 Using SSH protocol version 2
. 2016-09-14 15:00:40.458 We claim version: SSH-2.0-WinSCP_release_5.7.4
. 2016-09-14 15:00:40.474 Doing Diffie-Hellman group exchange
. 2016-09-14 15:00:40.520 Doing Diffie-Hellman key exchange with hash SHA-1
. 2016-09-14 15:00:40.645 Verifying host key rsa2 0x10001,0xcfe09bf17110d378 042f6f74989b8b67 db6db09809620875 842240e7358b5d1a 3d4b6b64c1101420 be1928cb51eb6449 6820e34f545d2b11 c34883cb11d81e9a 5f84d1e611eac956 fc773ea7f3bfe982 22d1095d29e3dcfb 6961222be579df7b 7d1e0d6e2795501c 0c8952715961410f 415584815f5e41a3 104ffa5564d123bd with fingerprint ssh-rsa 1024 97:83:f1:ec:8c:c4:3b:78:29:d9:c5:10:c8:fe:93:08
. 2016-09-14 15:00:40.645 Host key matches configured key
. 2016-09-14 15:00:40.645 Host key fingerprint is:
. 2016-09-14 15:00:40.645 ssh-rsa 1024 97:83:f1:ec:8c:c4:3b:78:29:d9:c5:10:c8:fe:93:08
. 2016-09-14 15:00:40.645 Initialised AES-256 SDCTR client->server encryption
. 2016-09-14 15:00:40.645 Initialised HMAC-SHA1 client->server MAC algorithm
. 2016-09-14 15:00:40.645 Initialised AES-256 SDCTR server->client encryption
. 2016-09-14 15:00:40.645 Initialised HMAC-SHA1 server->client MAC algorithm
! 2016-09-14 15:00:40.676 Using username "RDA_jkrupa".
. 2016-09-14 15:00:40.723 Prompt (password, "SSH password", , "&Password: ")
. 2016-09-14 15:00:40.723 Using stored password.
. 2016-09-14 15:00:40.723 Sent password
. 2016-09-14 15:00:40.786 Access granted
. 2016-09-14 15:00:40.786 Opening session as main channel
. 2016-09-14 15:00:40.801 Opened main channel
. 2016-09-14 15:00:40.864 Started a shell/command
. 2016-09-14 15:00:40.864 ————————————————————————–
. 2016-09-14 15:00:40.864 Using SFTP protocol.
. 2016-09-14 15:00:40.864 Doing startup conversation with host.
> 2016-09-14 15:00:40.864 Type: SSH_FXP_INIT, Size: 5, Number: -1
2016-09-14 15:00:40.879 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2016-09-14 15:00:40.910 Type: SSH_FXP_NAME, Size: 63, Number: 16 . 2016-09-14 15:00:40.910 Real path is '/RDA_jkrupa' . 2016-09-14 15:00:40.910 Startup conversation with host finished. 2016-09-14 15:00:41.332 Script: pwd 2016-09-14 15:00:41.472 Script: get -delete -nopermissions -nopreservetime -transfer="binary" -filemask="/RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt" -resumesupport="off" — "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt" "\\transferserver\DIGNITY-BILLING\agch_fhmc\*.txt" . 2016-09-14 15:00:41.472 Listing directory "/RDA_jkrupa/RDA/IN/CC/MS4/DEM". > 2016-09-14 15:00:41.472 Type: SSH_FXP_OPENDIR, Size: 38, Number: 267
2016-09-14 15:00:41.488 Type: SSH_FXP_READDIR, Size: 30, Number: 524
2016-09-14 15:00:41.519 Type: SSH_FXP_READDIR, Size: 30, Number: 780
< 2016-09-14 15:00:41.534 Type: SSH_FXP_STATUS, Size: 40, Number: 780 2016-09-14 15:00:41.534 Type: SSH_FXP_CLOSE, Size: 30, Number: 1028 . 2016-09-14 15:00:41.550 .working;d;0;2016-09-14T12:15:31.000Z;"0" [0];"0" [0];r–r–r–;2 . 2016-09-14 15:00:41.550 A-01_01_16-05_00_20.txt;-;7440;2016-09-14T22:00:25.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-09-14 15:00:41.550 F-01_01_16-05_00_05.txt;-;96716;2016-09-14T22:00:26.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-09-14 15:00:41.550 Copying 2 files/directories to local directory "\\transferserver\DIGNITY-BILLING\agch_fhmc\" . 2016-09-14 15:00:41.550 PrTime: No; PrRO: No; Rght: rw-r–r–; PrR: No (No); FnCs: N; RIC: 0100; Resume: N (102400); CalcS: No; Mask: *.txt . 2016-09-14 15:00:41.550 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: /RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt; ResumeL: 0 . 2016-09-14 15:00:41.550 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml . 2016-09-14 15:00:41.550 File: '/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-01_01_16-05_00_20.txt' [2016-09-14T22:00:25.000Z] [7440] . 2016-09-14 15:00:41.550 Copying "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-01_01_16-05_00_20.txt" to local directory started. . 2016-09-14 15:00:41.550 Binary transfer mode selected. . 2016-09-14 15:00:41.550 Opening remote file. > 2016-09-14 15:00:41.550 Type: SSH_FXP_OPEN, Size: 70, Number: 1283
< 2016-09-14 15:00:41.566 Type: SSH_FXP_STATUS, Size: 40, Number: 1028 . 2016-09-14 15:00:41.566 Discarding reserved response 2016-09-14 15:00:41.644 Type: SSH_FXP_FSTAT, Size: 31, Number: 1544 2016-09-14 15:00:41.659 Type: SSH_FXP_READ, Size: 43, Number: 1797 2016-09-14 15:00:41.722 Type: SSH_FXP_CLOSE, Size: 31, Number: 2820 2016-09-14 15:00:41.753 Type: SSH_FXP_REMOVE, Size: 62, Number: 3085 < 2016-09-14 15:00:41.784 Type: SSH_FXP_STATUS, Size: 40, Number: 2820 . 2016-09-14 15:00:41.784 Discarding reserved response < 2016-09-14 15:00:41.815 Type: SSH_FXP_STATUS, Size: 37, Number: 3085 2016-09-14 15:00:41.815 Type: SSH_FXP_OPEN, Size: 70, Number: 3331 2016-09-14 15:00:41.878 Type: SSH_FXP_FSTAT, Size: 30, Number: 3592 2016-09-14 15:00:41.909 Type: SSH_FXP_READ, Size: 42, Number: 3845 2016-09-14 15:00:42.002 Type: SSH_FXP_CLOSE, Size: 30, Number: 6404 < 2016-09-14 15:00:42.002 Type: SSH_FXP_STATUS, Size: 28, Number: 5637 < 2016-09-14 15:00:42.002 Type: SSH_FXP_STATUS, Size: 28, Number: 5893 2016-09-14 15:00:42.049 Type: SSH_FXP_REMOVE, Size: 62, Number: 6669 < 2016-09-14 15:00:42.049 Type: SSH_FXP_STATUS, Size: 40, Number: 6404 . 2016-09-14 15:00:42.049 Discarding reserved response < 2016-09-14 15:00:42.096 Type: SSH_FXP_STATUS, Size: 37, Number: 6669 2016-09-14 15:00:42.158 Script: put -delete -nopermissions -nopreservetime -transfer="binary" -filemask="/RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt" -resumesupport="off" — "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt" "\\transferserver\DIGNITY-Billing\agch_fhmc\" < 2016-09-14 15:00:42.158 Script: No file matching '/RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt' found. (System Error. Code: 3. 2016-09-14 15:00:42.299 Script: exit . 2016-09-14 15:00:42.299 Script: Exit code: 0 . 2016-09-14 15:00:42.299 Closing connection. . 2016-09-14 15:00:42.299 Sending special code: 12 . 2016-09-14 15:00:42.299 Sent EOF message . 2016-09-14 17:30:02.348 ————————————————————————– . 2016-09-14 17:30:02.348 WinSCP Version 5.7.4 (Build 5553) (OS 6.1.7601 Service Pack 1 – Windows Server 2008 R2 Standard) . 2016-09-14 17:30:02.348 Configuration: nul . 2016-09-14 17:30:02.348 Log level: Normal . 2016-09-14 17:30:02.348 Local account: RA-SLO\Administrator . 2016-09-14 17:30:02.348 Working directory: D:\Report-Copy-Move\SFTP . 2016-09-14 17:30:02.348 Process ID: 2576 . 2016-09-14 17:30:02.348 Command-line: "D:\Report-Copy-Move\SFTP\winscp.exe" /xmllog="C:\Users\administrator.RA-SLO.000\AppData\Local\Temp\wscp120C.0190CDD5.tmp" /xmlgroups /nointeractiveinput /dotnet=574 /ini=nul /log="D:\Report-Copy-Move\Logs\DIGNITY-demo_download-session-log.txt" /console /consoleinstance=_4620_52697555_243 . 2016-09-14 17:30:02.348 Time zone: Current: GMT-7, Standard: GMT-8 (Pacific Standard Time), DST: GMT-7 (Pacific Daylight Time), DST Start: 3/13/2016, DST End: 11/6/2016 . 2016-09-14 17:30:02.348 Login time: Wednesday, September 14, 2016 5:30:02 PM . 2016-09-14 17:30:02.348 ————————————————————————– . 2016-09-14 17:30:02.348 Script: Retrospectively logging previous script records: > 2016-09-14 17:30:02.348 Script: option batch on
< 2016-09-14 17:30:02.348 Script: batch on 2016-09-14 17:30:02.348 Script: option confirm off 2016-09-14 17:30:02.348 Script: option reconnecttime 120 2016-09-14 17:30:02.348 Script: open sftp://RDA_jkrupa:***@mft.dignityhealth.org:4022 -hostkey="ssh-rsa 1024 97:83:f1:ec:8c:c4:3b:78:29:d9:c5:10:c8:fe:93:08" -timeout=15 . 2016-09-14 17:30:02.348 ————————————————————————– . 2016-09-14 17:30:02.348 Session name:
RDA_jkrupa@mft.dignityhealth.org (Ad-Hoc site)
. 2016-09-14 17:30:02.348 Host name: mft.dignityhealth.org (Port: 4022)
. 2016-09-14 17:30:02.348 User name: RDA_jkrupa (Password: Yes, Key file: No)
. 2016-09-14 17:30:02.348 Tunnel: No
. 2016-09-14 17:30:02.348 Transfer Protocol: SFTP
. 2016-09-14 17:30:02.348 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2016-09-14 17:30:02.348 Disable Nagle: No
. 2016-09-14 17:30:02.348 Proxy: none
. 2016-09-14 17:30:02.348 Send buffer: 262144
. 2016-09-14 17:30:02.348 SSH protocol version: 2; Compression: No
. 2016-09-14 17:30:02.348 Bypass authentication: No
. 2016-09-14 17:30:02.348 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2016-09-14 17:30:02.348 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2016-09-14 17:30:02.348 KEX: dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN
. 2016-09-14 17:30:02.348 SSH Bugs: A,A,A,A,A,A,A,A,A,A,A
. 2016-09-14 17:30:02.348 Simple channel: Yes
. 2016-09-14 17:30:02.348 Return code variable: Autodetect; Lookup user groups: A
. 2016-09-14 17:30:02.348 Shell: default
. 2016-09-14 17:30:02.348 EOL: 0, UTF: 2
. 2016-09-14 17:30:02.348 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2016-09-14 17:30:02.348 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2016-09-14 17:30:02.348 SFTP Bugs: A,A
. 2016-09-14 17:30:02.348 SFTP Server: default
. 2016-09-14 17:30:02.348 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2016-09-14 17:30:02.348 Cache directory changes: Yes, Permanent: Yes
. 2016-09-14 17:30:02.348 DST mode: 1
. 2016-09-14 17:30:02.348 ————————————————————————–
. 2016-09-14 17:30:02.348 Looking up host "mft.dignityhealth.org"
. 2016-09-14 17:30:02.473 Connecting to 162.135.7.94 port 4022
. 2016-09-14 17:30:02.520 Server version: SSH-2.0-Maverick_SSHD
. 2016-09-14 17:30:02.520 Using SSH protocol version 2
. 2016-09-14 17:30:02.520 We claim version: SSH-2.0-WinSCP_release_5.7.4
. 2016-09-14 17:30:02.551 Doing Diffie-Hellman group exchange
. 2016-09-14 17:30:02.598 Doing Diffie-Hellman key exchange with hash SHA-1
. 2016-09-14 17:30:02.707 Verifying host key rsa2 0x10001,0xcfe09bf17110d378 042f6f74989b8b67 db6db09809620875 842240e7358b5d1a 3d4b6b64c1101420 be1928cb51eb6449 6820e34f545d2b11 c34883cb11d81e9a 5f84d1e611eac956 fc773ea7f3bfe982 22d1095d29e3dcfb 6961222be579df7b 7d1e0d6e2795501c 0c8952715961410f 415584815f5e41a3 104ffa5564d123bd with fingerprint ssh-rsa 1024 97:83:f1:ec:8c:c4:3b:78:29:d9:c5:10:c8:fe:93:08
. 2016-09-14 17:30:02.707 Host key matches configured key
. 2016-09-14 17:30:02.707 Host key fingerprint is:
. 2016-09-14 17:30:02.707 ssh-rsa 1024 97:83:f1:ec:8c:c4:3b:78:29:d9:c5:10:c8:fe:93:08
. 2016-09-14 17:30:02.707 Initialised AES-256 SDCTR client->server encryption
. 2016-09-14 17:30:02.707 Initialised HMAC-SHA1 client->server MAC algorithm
. 2016-09-14 17:30:02.707 Initialised AES-256 SDCTR server->client encryption
. 2016-09-14 17:30:02.707 Initialised HMAC-SHA1 server->client MAC algorithm
! 2016-09-14 17:30:02.754 Using username "RDA_jkrupa".
. 2016-09-14 17:30:02.785 Prompt (password, "SSH password", , "&Password: ")
. 2016-09-14 17:30:02.785 Using stored password.
. 2016-09-14 17:30:02.785 Sent password
. 2016-09-14 17:30:02.863 Access granted
. 2016-09-14 17:30:02.863 Opening session as main channel
. 2016-09-14 17:30:02.894 Opened main channel
. 2016-09-14 17:30:02.941 Started a shell/command
. 2016-09-14 17:30:02.941 ————————————————————————–
. 2016-09-14 17:30:02.941 Using SFTP protocol.
. 2016-09-14 17:30:02.941 Doing startup conversation with host.
> 2016-09-14 17:30:02.941 Type: SSH_FXP_INIT, Size: 5, Number: -1
2016-09-14 17:30:02.957 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2016-09-14 17:30:02.988 Type: SSH_FXP_NAME, Size: 63, Number: 16 . 2016-09-14 17:30:02.988 Real path is '/RDA_jkrupa' . 2016-09-14 17:30:02.988 Startup conversation with host finished. 2016-09-14 17:30:03.331 Script: pwd 2016-09-14 17:30:03.425 Script: get -delete -nopermissions -nopreservetime -transfer="binary" -filemask="/RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt" -resumesupport="off" — "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt" "\\transferserver\DIGNITY-BILLING\agch_fhmc\*.txt" . 2016-09-14 17:30:03.425 Listing directory "/RDA_jkrupa/RDA/IN/CC/MS4/DEM". > 2016-09-14 17:30:03.425 Type: SSH_FXP_OPENDIR, Size: 38, Number: 267
2016-09-14 17:30:03.534 Type: SSH_FXP_READDIR, Size: 31, Number: 524
2016-09-14 17:30:03.565 Type: SSH_FXP_READDIR, Size: 31, Number: 780
< 2016-09-14 17:30:03.581 Type: SSH_FXP_STATUS, Size: 40, Number: 780 2016-09-14 17:30:03.596 Type: SSH_FXP_CLOSE, Size: 31, Number: 1028 . 2016-09-14 17:30:03.596 .working;d;0;2016-09-14T22:49:08.000Z;"0" [0];"0" [0];r–r–r–;2 . 2016-09-14 17:30:03.596 A-09_14_16-05_00_14.txt;-;26802;2016-09-14T22:26:45.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-09-14 17:30:03.596 A-09_13_16-14_00_48.txt;-;0;2016-09-14T22:26:46.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-09-14 17:30:03.596 A-09_12_16-13_48_31.txt;-;0;2016-09-14T22:26:48.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-09-14 17:30:03.596 A-09_11_16-13_43_58.txt;-;28291;2016-09-14T22:26:50.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-09-14 17:30:03.596 A-09_10_16-13_31_14.txt;-;28291;2016-09-14T22:26:51.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-09-14 17:30:03.596 A-09_09_16-13_15_39.txt;-;28291;2016-09-14T22:49:08.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-09-14 17:30:03.596 Copying 6 files/directories to local directory "\\transferserver\DIGNITY-BILLING\agch_fhmc\" . 2016-09-14 17:30:03.596 PrTime: No; PrRO: No; Rght: rw-r–r–; PrR: No (No); FnCs: N; RIC: 0100; Resume: N (102400); CalcS: No; Mask: *.txt . 2016-09-14 17:30:03.596 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: /RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt; ResumeL: 0 . 2016-09-14 17:30:03.596 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml . 2016-09-14 17:30:03.596 File: '/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-09_14_16-05_00_14.txt' [2016-09-14T22:26:45.000Z] [26802] . 2016-09-14 17:30:03.596 Copying "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-09_14_16-05_00_14.txt" to local directory started. . 2016-09-14 17:30:03.596 Binary transfer mode selected. . 2016-09-14 17:30:03.612 Opening remote file. > 2016-09-14 17:30:03.612 Type: SSH_FXP_OPEN, Size: 70, Number: 1283
< 2016-09-14 17:30:03.612 Type: SSH_FXP_STATUS, Size: 40, Number: 1028 . 2016-09-14 17:30:03.612 Discarding reserved response 2016-09-14 17:30:03.690 Type: SSH_FXP_FSTAT, Size: 30, Number: 1544 2016-09-14 17:30:03.924 Type: SSH_FXP_READ, Size: 42, Number: 1797 2016-09-14 17:30:04.017 Type: SSH_FXP_CLOSE, Size: 30, Number: 4612 < 2016-09-14 17:30:04.033 Type: SSH_FXP_STATUS, Size: 28, Number: 3845 < 2016-09-14 17:30:04.080 Type: SSH_FXP_STATUS, Size: 28, Number: 4101 2016-09-14 17:30:04.080 Type: SSH_FXP_REMOVE, Size: 62, Number: 4877 < 2016-09-14 17:30:04.080 Type: SSH_FXP_STATUS, Size: 40, Number: 4612 . 2016-09-14 17:30:04.080 Discarding reserved response < 2016-09-14 17:30:04.127 Type: SSH_FXP_STATUS, Size: 37, Number: 4877 2016-09-14 17:30:04.127 Type: SSH_FXP_OPEN, Size: 70, Number: 5123 2016-09-14 17:30:04.220 Type: SSH_FXP_FSTAT, Size: 31, Number: 5384 2016-09-14 17:30:04.236 Type: SSH_FXP_READ, Size: 43, Number: 5637 2016-09-14 17:30:04.267 Type: SSH_FXP_CLOSE, Size: 31, Number: 5892 . 2016-09-14 17:30:04.267 Transfer done: '/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-09_13_16-14_00_48.txt' [0] . 2016-09-14 17:30:04.267 Deleting file "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-09_13_16-14_00_48.txt". > 2016-09-14 17:30:04.267 Type: SSH_FXP_REMOVE, Size: 62, Number: 6157
< 2016-09-14 17:30:04.345 Type: SSH_FXP_STATUS, Size: 40, Number: 5892 . 2016-09-14 17:30:04.345 Discarding reserved response < 2016-09-14 17:30:04.345 Type: SSH_FXP_STATUS, Size: 37, Number: 6157 2016-09-14 17:30:04.345 Type: SSH_FXP_OPEN, Size: 70, Number: 6403 2016-09-14 17:30:04.423 Type: SSH_FXP_FSTAT, Size: 30, Number: 6664 2016-09-14 17:30:04.454 Type: SSH_FXP_READ, Size: 42, Number: 6917 2016-09-14 17:30:04.470 Type: SSH_FXP_CLOSE, Size: 30, Number: 7172 . 2016-09-14 17:30:04.470 Transfer done: '/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-09_12_16-13_48_31.txt' [0] . 2016-09-14 17:30:04.470 Deleting file "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-09_12_16-13_48_31.txt". > 2016-09-14 17:30:04.470 Type: SSH_FXP_REMOVE, Size: 62, Number: 7437
< 2016-09-14 17:30:04.501 Type: SSH_FXP_STATUS, Size: 40, Number: 7172 . 2016-09-14 17:30:04.501 Discarding reserved response < 2016-09-14 17:30:04.532 Type: SSH_FXP_STATUS, Size: 37, Number: 7437 2016-09-14 17:30:04.532 Type: SSH_FXP_OPEN, Size: 70, Number: 7683 2016-09-14 17:30:04.626 Type: SSH_FXP_FSTAT, Size: 31, Number: 7944 2016-09-14 17:30:04.641 Type: SSH_FXP_READ, Size: 43, Number: 8197 2016-09-14 17:30:04.719 Type: SSH_FXP_CLOSE, Size: 31, Number: 8708 . 2016-09-14 17:30:04.719 Transfer done: '/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-09_11_16-13_43_58.txt' [28291] . 2016-09-14 17:30:04.719 Deleting file "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-09_11_16-13_43_58.txt". > 2016-09-14 17:30:04.719 Type: SSH_FXP_REMOVE, Size: 62, Number: 8973
< 2016-09-14 17:30:05.172 Type: SSH_FXP_STATUS, Size: 40, Number: 8708 . 2016-09-14 17:30:05.172 Discarding reserved response < 2016-09-14 17:30:05.172 Type: SSH_FXP_STATUS, Size: 37, Number: 8973 2016-09-14 17:30:05.172 Type: SSH_FXP_OPEN, Size: 70, Number: 9219 2016-09-14 17:30:05.265 Type: SSH_FXP_FSTAT, Size: 31, Number: 9480 2016-09-14 17:30:05.312 Type: SSH_FXP_READ, Size: 43, Number: 9733 2016-09-14 17:30:05.375 Type: SSH_FXP_CLOSE, Size: 31, Number: 10244 . 2016-09-14 17:30:05.375 Transfer done: '/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-09_10_16-13_31_14.txt' [28291] . 2016-09-14 17:30:05.375 Deleting file "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-09_10_16-13_31_14.txt". > 2016-09-14 17:30:05.375 Type: SSH_FXP_REMOVE, Size: 62, Number: 10509
< 2016-09-14 17:30:05.468 Type: SSH_FXP_STATUS, Size: 40, Number: 10244 . 2016-09-14 17:30:05.468 Discarding reserved response < 2016-09-14 17:30:05.468 Type: SSH_FXP_STATUS, Size: 37, Number: 10509 2016-09-14 17:30:05.468 Type: SSH_FXP_OPEN, Size: 70, Number: 10755 2016-09-14 17:30:05.531 Type: SSH_FXP_FSTAT, Size: 31, Number: 11016 2016-09-14 17:30:05.562 Type: SSH_FXP_READ, Size: 43, Number: 11269 2016-09-14 17:30:05.640 Type: SSH_FXP_CLOSE, Size: 31, Number: 11780 . 2016-09-14 17:30:05.640 Transfer done: '/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-09_09_16-13_15_39.txt' [28291] . 2016-09-14 17:30:05.640 Deleting file "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-09_09_16-13_15_39.txt". > 2016-09-14 17:30:05.640 Type: SSH_FXP_REMOVE, Size: 62, Number: 12045
< 2016-09-14 17:30:05.671 Type: SSH_FXP_STATUS, Size: 40, Number: 11780 . 2016-09-14 17:30:05.671 Discarding reserved response < 2016-09-14 17:30:05.718 Type: SSH_FXP_STATUS, Size: 37, Number: 12045 2016-09-14 17:30:06.061 Script: put -nopermissions -nopreservetime -transfer="binary" -filemask="/RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt" -resumesupport="off" — "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/" "\\transferserver\DIGNITY-Billing\agch_fhmc" . 2016-09-14 17:30:06.061 Copying 1 files/directories to remote directory "/RDA_jkrupa" . 2016-09-14 17:30:06.061 PrTime: No; PrRO: No; Rght: rw-r–r–; PrR: No (No); FnCs: N; RIC: 0100; Resume: N (102400); CalcS: No; Mask: \\transferserver\DIGNITY-Billing\agch_fhmc . 2016-09-14 17:30:06.061 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: /RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt; ResumeL: 0 . 2016-09-14 17:30:06.061 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml * 2016-09-14 17:30:06.061 (EOSError) System Error. Code: 3. * 2016-09-14 17:30:06.061 The system cannot find the path specified . 2016-09-14 17:30:06.061 Asking user: . 2016-09-14 17:30:06.061 File or folder '/RDA_jkrupa/RDA/IN/CC/MS4/DEM/' does not exist. ("System Error. Code: 3. . 2016-09-14 17:30:06.061 The system cannot find the path specified") < 2016-09-14 17:30:06.061 Script: File or folder '/RDA_jkrupa/RDA/IN/CC/MS4/DEM/' does not exist. < 2016-09-14 17:30:06.061 Script: System Error. Code: 3. 2016-09-14 17:30:06.217 Script: exit . 2016-09-14 17:30:06.217 Script: Exit code: 1 . 2016-09-14 17:30:06.217 Closing connection. . 2016-09-14 17:30:06.217 Sending special code: 12 . 2016-09-14 17:30:06.217 Sent EOF message . 2016-09-15 09:50:35.448 ————————————————————————– . 2016-09-15 09:50:35.464 WinSCP Version 5.7.4 (Build 5553) (OS 6.1.7601 Service Pack 1 – Windows Server 2008 R2 Standard) . 2016-09-15 09:50:35.464 Configuration: nul . 2016-09-15 09:50:35.464 Log level: Normal . 2016-09-15 09:50:35.464 Local account: RA-SLO\administrator . 2016-09-15 09:50:35.464 Working directory: D:\Report-Copy-Move\SFTP . 2016-09-15 09:50:35.464 Process ID: 5016 . 2016-09-15 09:50:35.464 Command-line: "D:\Report-Copy-Move\SFTP\winscp.exe" /xmllog="C:\Users\administrator.RA-SLO.000\AppData\Local\Temp\2\wscp135C.008DEACA.tmp" /xmlgroups /nointeractiveinput /dotnet=574 /ini=nul /log="D:\Report-Copy-Move\Logs\DIGNITY-demo_download-session-log.txt" /console /consoleinstance=_4956_38487058_704 . 2016-09-15 09:50:35.464 Time zone: Current: GMT-7, Standard: GMT-8 (Pacific Standard Time), DST: GMT-7 (Pacific Daylight Time), DST Start: 3/13/2016, DST End: 11/6/2016 . 2016-09-15 09:50:35.464 Login time: Thursday, September 15, 2016 9:50:35 AM . 2016-09-15 09:50:35.464 ————————————————————————– . 2016-09-15 09:50:35.464 Script: Retrospectively logging previous script records: > 2016-09-15 09:50:35.464 Script: option batch on
< 2016-09-15 09:50:35.464 Script: batch on 2016-09-15 09:50:35.464 Script: option confirm off 2016-09-15 09:50:35.464 Script: option reconnecttime 120 2016-09-15 09:50:35.464 Script: open sftp://RDA_jkrupa:***@mft.dignityhealth.org:4022 -hostkey="ssh-rsa 1024 97:83:f1:ec:8c:c4:3b:78:29:d9:c5:10:c8:fe:93:08" -timeout=15 . 2016-09-15 09:50:35.464 ————————————————————————– . 2016-09-15 09:50:35.464 Session name:
RDA_jkrupa@mft.dignityhealth.org (Ad-Hoc site)
. 2016-09-15 09:50:35.464 Host name: mft.dignityhealth.org (Port: 4022)
. 2016-09-15 09:50:35.464 User name: RDA_jkrupa (Password: Yes, Key file: No)
. 2016-09-15 09:50:35.464 Tunnel: No
. 2016-09-15 09:50:35.464 Transfer Protocol: SFTP
. 2016-09-15 09:50:35.464 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2016-09-15 09:50:35.464 Disable Nagle: No
. 2016-09-15 09:50:35.464 Proxy: none
. 2016-09-15 09:50:35.464 Send buffer: 262144
. 2016-09-15 09:50:35.464 SSH protocol version: 2; Compression: No
. 2016-09-15 09:50:35.464 Bypass authentication: No
. 2016-09-15 09:50:35.464 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2016-09-15 09:50:35.464 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2016-09-15 09:50:35.464 KEX: dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN
. 2016-09-15 09:50:35.464 SSH Bugs: A,A,A,A,A,A,A,A,A,A,A
. 2016-09-15 09:50:35.464 Simple channel: Yes
. 2016-09-15 09:50:35.464 Return code variable: Autodetect; Lookup user groups: A
. 2016-09-15 09:50:35.464 Shell: default
. 2016-09-15 09:50:35.464 EOL: 0, UTF: 2
. 2016-09-15 09:50:35.464 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2016-09-15 09:50:35.464 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2016-09-15 09:50:35.464 SFTP Bugs: A,A
. 2016-09-15 09:50:35.464 SFTP Server: default
. 2016-09-15 09:50:35.464 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2016-09-15 09:50:35.464 Cache directory changes: Yes, Permanent: Yes
. 2016-09-15 09:50:35.464 DST mode: 1
. 2016-09-15 09:50:35.464 ————————————————————————–
. 2016-09-15 09:50:35.464 Looking up host "mft.dignityhealth.org"
. 2016-09-15 09:50:35.526 Connecting to 162.135.7.94 port 4022
. 2016-09-15 09:50:35.573 Server version: SSH-2.0-Maverick_SSHD
. 2016-09-15 09:50:35.573 Using SSH protocol version 2
. 2016-09-15 09:50:35.573 We claim version: SSH-2.0-WinSCP_release_5.7.4
. 2016-09-15 09:50:35.604 Doing Diffie-Hellman group exchange
. 2016-09-15 09:50:35.651 Doing Diffie-Hellman key exchange with hash SHA-1
. 2016-09-15 09:50:35.760 Verifying host key rsa2 0x10001,0xcfe09bf17110d378 042f6f74989b8b67 db6db09809620875 842240e7358b5d1a 3d4b6b64c1101420 be1928cb51eb6449 6820e34f545d2b11 c34883cb11d81e9a 5f84d1e611eac956 fc773ea7f3bfe982 22d1095d29e3dcfb 6961222be579df7b 7d1e0d6e2795501c 0c8952715961410f 415584815f5e41a3 104ffa5564d123bd with fingerprint ssh-rsa 1024 97:83:f1:ec:8c:c4:3b:78:29:d9:c5:10:c8:fe:93:08
. 2016-09-15 09:50:35.760 Host key matches configured key
. 2016-09-15 09:50:35.760 Host key fingerprint is:
. 2016-09-15 09:50:35.760 ssh-rsa 1024 97:83:f1:ec:8c:c4:3b:78:29:d9:c5:10:c8:fe:93:08
. 2016-09-15 09:50:35.760 Initialised AES-256 SDCTR client->server encryption
. 2016-09-15 09:50:35.760 Initialised HMAC-SHA1 client->server MAC algorithm
. 2016-09-15 09:50:35.760 Initialised AES-256 SDCTR server->client encryption
. 2016-09-15 09:50:35.760 Initialised HMAC-SHA1 server->client MAC algorithm
! 2016-09-15 09:50:35.807 Using username "RDA_jkrupa".
. 2016-09-15 09:50:35.838 Prompt (password, "SSH password", , "&Password: ")
. 2016-09-15 09:50:35.838 Using stored password.
. 2016-09-15 09:50:35.838 Sent password
. 2016-09-15 09:50:35.932 Access granted
. 2016-09-15 09:50:35.932 Opening session as main channel
. 2016-09-15 09:50:35.947 Opened main channel
. 2016-09-15 09:50:35.994 Started a shell/command
. 2016-09-15 09:50:35.994 ————————————————————————–
. 2016-09-15 09:50:35.994 Using SFTP protocol.
. 2016-09-15 09:50:35.994 Doing startup conversation with host.
> 2016-09-15 09:50:35.994 Type: SSH_FXP_INIT, Size: 5, Number: -1
2016-09-15 09:50:36.025 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2016-09-15 09:50:36.056 Type: SSH_FXP_NAME, Size: 63, Number: 16 . 2016-09-15 09:50:36.056 Real path is '/RDA_jkrupa' . 2016-09-15 09:50:36.056 Startup conversation with host finished. 2016-09-15 09:50:36.103 Script: pwd 2016-09-15 09:50:36.556 Script: get -delete -nopermissions -nopreservetime -transfer="binary" -filemask="/RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt" -resumesupport="off" — "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt" "\\transferserver\DIGNITY-BILLING\agch_fhmc\*.txt" . 2016-09-15 09:50:36.556 Listing directory "/RDA_jkrupa/RDA/IN/CC/MS4/DEM". > 2016-09-15 09:50:36.556 Type: SSH_FXP_OPENDIR, Size: 38, Number: 267
2016-09-15 09:50:36.587 Type: SSH_FXP_READDIR, Size: 30, Number: 524
2016-09-15 09:50:36.618 Type: SSH_FXP_READDIR, Size: 30, Number: 780
< 2016-09-15 09:50:36.634 Type: SSH_FXP_STATUS, Size: 40, Number: 780 2016-09-15 09:50:36.634 Type: SSH_FXP_CLOSE, Size: 30, Number: 1028 . 2016-09-15 09:50:36.634 .working;d;0;2016-09-15T12:15:32.000Z;"0" [0];"0" [0];r–r–r–;2 . 2016-09-15 09:50:36.634 F-09_15_16-05_00_02.txt;-;160486;2016-09-15T12:15:11.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-09-15 09:50:36.634 A-09_15_16-05_00_21.txt;-;31269;2016-09-15T12:15:32.000Z;"0" [0];"0" [0];rw-rw-rw-;1 . 2016-09-15 09:50:36.634 Copying 2 files/directories to local directory "\\transferserver\DIGNITY-BILLING\agch_fhmc\" . 2016-09-15 09:50:36.634 PrTime: No; PrRO: No; Rght: rw-r–r–; PrR: No (No); FnCs: N; RIC: 0100; Resume: N (102400); CalcS: No; Mask: *.txt . 2016-09-15 09:50:36.634 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: /RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt; ResumeL: 0 . 2016-09-15 09:50:36.634 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml . 2016-09-15 09:50:36.634 File: '/RDA_jkrupa/RDA/IN/CC/MS4/DEM/F-09_15_16-05_00_02.txt' [2016-09-15T12:15:11.000Z] [160486] . 2016-09-15 09:50:36.634 Copying "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/F-09_15_16-05_00_02.txt" to local directory started. . 2016-09-15 09:50:36.634 Binary transfer mode selected. . 2016-09-15 09:50:36.665 Opening remote file. > 2016-09-15 09:50:36.665 Type: SSH_FXP_OPEN, Size: 70, Number: 1283
< 2016-09-15 09:50:36.665 Type: SSH_FXP_STATUS, Size: 40, Number: 1028 . 2016-09-15 09:50:36.665 Discarding reserved response 2016-09-15 09:50:36.774 Type: SSH_FXP_FSTAT, Size: 29, Number: 1544 2016-09-15 09:50:36.805 Type: SSH_FXP_READ, Size: 41, Number: 1797 2016-09-15 09:50:36.946 Type: SSH_FXP_CLOSE, Size: 29, Number: 5636 < 2016-09-15 09:50:36.961 Type: SSH_FXP_STATUS, Size: 28, Number: 4869 < 2016-09-15 09:50:36.977 Type: SSH_FXP_STATUS, Size: 28, Number: 5125 2016-09-15 09:50:36.977 Type: SSH_FXP_REMOVE, Size: 62, Number: 5901 < 2016-09-15 09:50:36.992 Type: SSH_FXP_STATUS, Size: 40, Number: 5636 . 2016-09-15 09:50:36.992 Discarding reserved response < 2016-09-15 09:50:37.070 Type: SSH_FXP_STATUS, Size: 37, Number: 5901 2016-09-15 09:50:37.086 Type: SSH_FXP_OPEN, Size: 70, Number: 6147 2016-09-15 09:50:37.211 Type: SSH_FXP_FSTAT, Size: 31, Number: 6408 2016-09-15 09:50:37.242 Type: SSH_FXP_READ, Size: 43, Number: 6661 2016-09-15 09:50:37.320 Type: SSH_FXP_CLOSE, Size: 31, Number: 7172 . 2016-09-15 09:50:37.320 Transfer done: '/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-09_15_16-05_00_21.txt' [31269] . 2016-09-15 09:50:37.320 Deleting file "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/A-09_15_16-05_00_21.txt". > 2016-09-15 09:50:37.320 Type: SSH_FXP_REMOVE, Size: 62, Number: 7437
< 2016-09-15 09:50:37.414 Type: SSH_FXP_STATUS, Size: 40, Number: 7172 . 2016-09-15 09:50:37.414 Discarding reserved response < 2016-09-15 09:50:37.414 Type: SSH_FXP_STATUS, Size: 37, Number: 7437 2016-09-15 09:50:37.772 Script: put -delete -nopermissions -nopreservetime -transfer="binary" -filemask="/RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt" -resumesupport="off" — "/RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt" "\\transferserver\DIGNITY-Billing\agch_fhmc\" < 2016-09-15 09:50:37.772 Script: No file matching '/RDA_jkrupa/RDA/IN/CC/MS4/DEM/*.txt' found. (System Error. Code: 3. 2016-09-15 09:50:38.038 Script: exit . 2016-09-15 09:50:38.038 Script: Exit code: 0 . 2016-09-15 09:50:38.038 Closing connection. . 2016-09-15 09:50:38.038 Sending special code: 12 . 2016-09-15 09:50:38.038 Sent EOF message