Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Please show us a full log file from GUI (and code log for the same time frame).
SomeRandomNoob

Adding wildcard give me an error stating that there is no directory found.

Note that this program I am running seems to work on another computer.
SomeRandomNoob

Can't See/Download Files

There are no real errors.

I realize I cannot delete or I will get a permissions error if I switch Getfiles(,,true,)

  public void DownloadFiles(string fromDir, string toDir)

        {
            TransferOptions transferOptions = new TransferOptions();
            transferOptions.TransferMode = TransferMode.Binary;
            TransferOperationResult transferResult;
            transferResult = session.GetFiles(fromDir, toDir, false, transferOptions);
            RemoteDirectoryInfo directory = session.ListDirectory(fromDir);

            foreach (RemoteFileInfo fileInfo in directory.Files)
            {
                Console.WriteLine("{0} with size {1}, permissions {2} and last modification at {3}",
                    fileInfo.Name, fileInfo.Length, fileInfo.FilePermissions, fileInfo.LastWriteTime);
            }
           // Console.Read();
            transferResult.Check();
            /*
            foreach (TransferEventArgs transfer in transferResult.Transfers)
            {
                session.RemoveFiles(Path.Combine(fromDir, transfer.FileName));
            }*/
        }


. 2017-03-02 20:23:13.628 --------------------------------------------------------------------------

. 2017-03-02 20:23:13.629 WinSCP Version 5.9.4 (Build 7333) (OS 10.0.14393 - Windows 10 Pro)
. 2017-03-02 20:23:13.629 Configuration: nul
. 2017-03-02 20:23:13.629 Log level: Normal
. 2017-03-02 20:23:13.629 Local account: APEX\wang
. 2017-03-02 20:23:13.629 Working directory: C:\Users\wang\Desktop\ApxOrderInterface_FULL\HL7FileCollector\HL7FileCollector\bin\Debug
. 2017-03-02 20:23:13.629 Process ID: 6840
. 2017-03-02 20:23:13.629 Command-line: "C:\Users\wang\Desktop\ApxOrderInterface_FULL\HL7FileCollector\HL7FileCollector\bin\Debug\winscp.exe" /xmllog="C:\Users\wang\AppData\Local\Temp\wscp08EC.027B3821.tmp" /xmlgroups /xmllogrequired /nointeractiveinput /dotnet=594  /ini=nul /log="outlog.txt"  /console /consoleinstance=_2284_61398511_231
. 2017-03-02 20:23:13.630 Time zone: Current: GMT-5, Standard: GMT-5 (Eastern Standard Time), DST: GMT-4 (Eastern Daylight Time), DST Start: 3/12/2017, DST End: 11/5/2017
. 2017-03-02 20:23:13.630 Login time: Thursday, March 2, 2017 8:23:13 PM
. 2017-03-02 20:23:13.630 --------------------------------------------------------------------------
. 2017-03-02 20:23:13.630 Script: Retrospectively logging previous script records:
> 2017-03-02 20:23:13.630 Script: option batch on
< 2017-03-02 20:23:13.630 Script: batch           on       
< 2017-03-02 20:23:13.630 Script: reconnecttime   120       
> 2017-03-02 20:23:13.630 Script: option confirm off
< 2017-03-02 20:23:13.630 Script: confirm         off       
> 2017-03-02 20:23:13.630 Script: option reconnecttime 120
< 2017-03-02 20:23:13.630 Script: reconnecttime   120       
> 2017-03-02 20:23:13.630 Script: open sftp://ApexLabsOrdersProd2016:***@sftp.athenahealth.com:22 -hostkey="ssh-rsa 2048 54:61:df:5d:c3:f2:65:de:bc:4d:2c:08:25:ac:6e:91" -timeout=15
. 2017-03-02 20:23:13.630 --------------------------------------------------------------------------
. 2017-03-02 20:23:13.630 Session name: ApexLabsOrdersProd2016@sftp.athenahealth.com (Ad-Hoc site)
. 2017-03-02 20:23:13.630 Host name: sftp.athenahealth.com (Port: 22)
. 2017-03-02 20:23:13.630 User name: ApexLabsOrdersProd2016 (Password: Yes, Key file: No, Passphrase: No)
. 2017-03-02 20:23:13.630 Tunnel: No
. 2017-03-02 20:23:13.630 Transfer Protocol: SFTP
. 2017-03-02 20:23:13.630 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2017-03-02 20:23:13.630 Disable Nagle: No
. 2017-03-02 20:23:13.630 Proxy: None
. 2017-03-02 20:23:13.630 Send buffer: 262144
. 2017-03-02 20:23:13.630 SSH protocol version: 2; Compression: No
. 2017-03-02 20:23:13.630 Bypass authentication: No
. 2017-03-02 20:23:13.630 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2017-03-02 20:23:13.630 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2017-03-02 20:23:13.630 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2017-03-02 20:23:13.630 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2017-03-02 20:23:13.630 Simple channel: Yes
. 2017-03-02 20:23:13.630 Return code variable: Autodetect; Lookup user groups: Auto
. 2017-03-02 20:23:13.630 Shell: default
. 2017-03-02 20:23:13.630 EOL: LF, UTF: Auto
. 2017-03-02 20:23:13.630 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2017-03-02 20:23:13.630 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2017-03-02 20:23:13.630 SFTP Bugs: Auto,Auto
. 2017-03-02 20:23:13.630 SFTP Server: default
. 2017-03-02 20:23:13.630 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2017-03-02 20:23:13.630 Cache directory changes: Yes, Permanent: Yes
. 2017-03-02 20:23:13.630 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2017-03-02 20:23:13.630 DST mode: Unix
. 2017-03-02 20:23:13.630 --------------------------------------------------------------------------
. 2017-03-02 20:23:13.631 Looking up host "sftp.athenahealth.com" for SSH connection
. 2017-03-02 20:23:13.653 Connecting to 208.78.141.25 port 22
. 2017-03-02 20:23:13.662 We claim version: SSH-2.0-WinSCP_release_5.9.4
. 2017-03-02 20:23:13.805 Server version: SSH-2.0-OpenSSH_5.3
. 2017-03-02 20:23:13.805 We believe remote version has SSH-2 channel request bug
. 2017-03-02 20:23:13.805 Using SSH protocol version 2
. 2017-03-02 20:23:13.806 Have a known host key of type rsa2
. 2017-03-02 20:23:13.807 Doing Diffie-Hellman group exchange
. 2017-03-02 20:23:13.824 Doing Diffie-Hellman key exchange with hash SHA-256
. 2017-03-02 20:23:14.344 Server also has ssh-dss host key, but we don't know it
. 2017-03-02 20:23:14.344 Host key fingerprint is:
. 2017-03-02 20:23:14.344 ssh-rsa 2048 54:61:df:5d:c3:f2:65:de:bc:4d:2c:08:25:ac:6e:91
. 2017-03-02 20:23:14.344 Verifying host key rsa2 0x23,0xb29ce64ef13e67aa f837343128900249 aa0296c410f5233d 92a95264fc970356 451bddc38fe4a908 28aeb6321067574b 65c57e323a313e66 c398c2d05dd6a998 868df83f8f6a879d 77e49e90afa5fd22 bbcba30b19382f5a 40c1a66dd044f56e 7e671e1e004725ba 2a058f23c7e2beaf e4540a163e0de74a 596580067864d116 e81674e1a79836c5 3038772f182a99ce 0bcded0d87c0f39c e37152b8eee53013 283265a79d80224d 954cfd3cd429ab5a ae5def6f6fbc8ed0 ec6831b072e90c65 b07f97dd6b671fa3 adb9792d5f4145f7 89c112b8bf5c3ef9 89e85a0ec6f12b62 b5503fce6212117d cbdf7ddb12e6aab7 bb9551de50e600e4 d2a56ee0ccfe7e8d  with fingerprint ssh-rsa 2048 54:61:df:5d:c3:f2:65:de:bc:4d:2c:08:25:ac:6e:91
. 2017-03-02 20:23:14.344 Host key matches configured key
. 2017-03-02 20:23:14.344 Initialised AES-256 SDCTR client->server encryption
. 2017-03-02 20:23:14.344 Initialised HMAC-SHA-256 client->server MAC algorithm
. 2017-03-02 20:23:14.344 Initialised AES-256 SDCTR server->client encryption
. 2017-03-02 20:23:14.344 Initialised HMAC-SHA-256 server->client MAC algorithm
! 2017-03-02 20:23:14.360 Using username "ApexLabsOrdersProd2016".
. 2017-03-02 20:23:14.374 Server offered these authentication methods: publickey,gssapi-keyex,gssapi-with-mic,password
. 2017-03-02 20:23:14.374 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2017-03-02 20:23:14.374 Using stored password.
. 2017-03-02 20:23:14.374 Sent password
. 2017-03-02 20:23:14.483 Access granted
. 2017-03-02 20:23:14.483 Opening session as main channel
. 2017-03-02 20:23:14.497 Opened main channel
. 2017-03-02 20:23:14.514 Started a shell/command
. 2017-03-02 20:23:14.514 --------------------------------------------------------------------------
. 2017-03-02 20:23:14.514 Using SFTP protocol.
. 2017-03-02 20:23:14.515 Doing startup conversation with host.
> 2017-03-02 20:23:14.515 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2017-03-02 20:23:14.523 Type: SSH_FXP_VERSION, Size: 95, Number: -1
. 2017-03-02 20:23:14.523 SFTP version 3 negotiated.
. 2017-03-02 20:23:14.523 Unknown server extension posix-rename@openssh.com="1"
. 2017-03-02 20:23:14.523 Supports statvfs@openssh.com extension version "2"
. 2017-03-02 20:23:14.523 Unknown server extension fstatvfs@openssh.com="2"
. 2017-03-02 20:23:14.523 We believe the server has signed timestamps bug
. 2017-03-02 20:23:14.523 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 strings are not mandatory
. 2017-03-02 20:23:14.523 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2017-03-02 20:23:14.523 Getting current directory name.
. 2017-03-02 20:23:14.523 Getting real path for '.'
> 2017-03-02 20:23:14.523 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2017-03-02 20:23:14.532 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2017-03-02 20:23:14.532 Real path is '/'
. 2017-03-02 20:23:14.532 Startup conversation with host finished.
< 2017-03-02 20:23:14.532 Script: Active session: [1] ApexLabsOrdersProd2016@sftp.athenahealth.com
> 2017-03-02 20:23:15.235 Script: pwd
< 2017-03-02 20:23:15.236 Script: /
> 2017-03-02 20:23:15.290 Script: get  -nopermissions -preservetime -transfer="binary" -- "/outboundfromathena" "C:\Users\wang\Desktop\HL7_STORAGE1\2017\3\22023\5_ATHENA"
. 2017-03-02 20:23:15.291 Listing file "/outboundfromathena".
> 2017-03-02 20:23:15.291 Type: SSH_FXP_LSTAT, Size: 28, Number: 263
< 2017-03-02 20:23:15.300 Type: SSH_FXP_ATTRS, Size: 37, Number: 263
. 2017-03-02 20:23:15.300 outboundfromathena;D;0;2017-03-02T23:44:13.000Z;3;"" [10538];"" [9000];rwxr-xr-x;0
. 2017-03-02 20:23:15.300 Copying 1 files/directories to local directory "C:\Users\wang\Desktop\HL7_STORAGE1\2017\3\22023\"
. 2017-03-02 20:23:15.300   PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask: 5_ATHENA
. 2017-03-02 20:23:15.300   TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: ; ResumeL: 0
. 2017-03-02 20:23:15.300   AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2017-03-02 20:23:15.300 File: '/outboundfromathena' [2017-03-02T23:44:13.000Z] [0]
. 2017-03-02 20:23:15.300 Listing directory "/outboundfromathena".
> 2017-03-02 20:23:15.300 Type: SSH_FXP_OPENDIR, Size: 28, Number: 523
< 2017-03-02 20:23:15.309 Type: SSH_FXP_HANDLE, Size: 13, Number: 523
> 2017-03-02 20:23:15.309 Type: SSH_FXP_READDIR, Size: 13, Number: 780
< 2017-03-02 20:23:15.317 Type: SSH_FXP_NAME, Size: 207, Number: 780
> 2017-03-02 20:23:15.317 Type: SSH_FXP_READDIR, Size: 13, Number: 1036
< 2017-03-02 20:23:15.326 Type: SSH_FXP_STATUS, Size: 28, Number: 1036
< 2017-03-02 20:23:15.326 Status code: 1
> 2017-03-02 20:23:15.326 Type: SSH_FXP_CLOSE, Size: 13, Number: 1284
. 2017-03-02 20:23:15.326 .;d;0;2017-03-02T23:44:13.000Z;3;"10538" [10538];"9000" [9000];rwxr-xr-x;0
. 2017-03-02 20:23:15.326 ..;d;0;2016-09-10T05:35:05.000Z;3;"0" [0];"0" [0];rwxr-xr-x;0
> 2017-03-02 20:23:15.351 Script: ls -- "/outboundfromathena/"
. 2017-03-02 20:23:15.351 Listing directory "/outboundfromathena".
> 2017-03-02 20:23:15.351 Type: SSH_FXP_OPENDIR, Size: 28, Number: 1547
< 2017-03-02 20:23:15.351 Type: SSH_FXP_STATUS, Size: 24, Number: 1284
. 2017-03-02 20:23:15.351 Discarding reserved response
< 2017-03-02 20:23:15.359 Type: SSH_FXP_HANDLE, Size: 13, Number: 1547
> 2017-03-02 20:23:15.360 Type: SSH_FXP_READDIR, Size: 13, Number: 1804
< 2017-03-02 20:23:15.368 Type: SSH_FXP_NAME, Size: 207, Number: 1804
> 2017-03-02 20:23:15.368 Type: SSH_FXP_READDIR, Size: 13, Number: 2060
< 2017-03-02 20:23:15.377 Type: SSH_FXP_STATUS, Size: 28, Number: 2060
< 2017-03-02 20:23:15.377 Status code: 1
> 2017-03-02 20:23:15.377 Type: SSH_FXP_CLOSE, Size: 13, Number: 2308
. 2017-03-02 20:23:15.377 .;d;0;2017-03-02T23:44:13.000Z;3;"10538" [10538];"9000" [9000];rwxr-xr-x;0
. 2017-03-02 20:23:15.377 ..;d;0;2016-09-10T05:35:05.000Z;3;"0" [0];"0" [0];rwxr-xr-x;0
< 2017-03-02 20:23:15.377 Script: drwxr-xr-x   2 10538    9000          4096 Mar  2 18:44:13 2017 .
< 2017-03-02 20:23:15.377 Script: drwxr-xr-x   4 0        0             4096 Sep 10  1:35:05 2016 ..
> 2017-03-02 20:23:15.408 Script: exit
. 2017-03-02 20:23:15.408 Script: Exit code: 0
. 2017-03-02 20:23:15.408 Closing connection.
. 2017-03-02 20:23:15.408 Sending special code: 12
. 2017-03-02 20:23:15.408 Sent EOF message