Below you'll find the entire session log as well as my command line code and batch script.
I'm calling WinSCP via a scheduled task on a Win2K8 R2 server that was credentialed using a service account.
Also I am running WinSCP 4.3.5 because that was the version I was requested to use by a vendor, but am open to updating my version if it'll address my issue.
@echo on
C:
cd Program Files
cd WinSCP
winscp.com /script=XXXXXXX_835_SFTP.txt /log=XXXXXX_835_SFTP_LOG.txt
option batch abort
option confirm off
open sftp://XXXX:
[email protected] -hostkey="ssh-dss 1024 XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX"
option transfer binary
lcd "\\NTS02\InsightCS\ERA\Files To Export"
cd "/"
put -delete -nopreservetime -nopermissions *.835
close
exit
2012-06-27 21:00:01.108 --------------------------------------------------------------------------
. 2012-06-27 21:00:01.108 WinSCP Version 4.3.5 (Build 1463) (OS 6.0.6002 Service Pack 2)
. 2012-06-27 21:00:01.108 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2012-06-27 21:00:01.108 Local account: TMMC_DOMAIN\spsadmin
. 2012-06-27 21:00:01.108 Login time: Wednesday, June 27, 2012 9:00:01 PM
. 2012-06-27 21:00:01.108 --------------------------------------------------------------------------
. 2012-06-27 21:00:01.108 Session name:
[email protected] (Ad-Hoc session)
. 2012-06-27 21:00:01.108 Host name: XXXX.XXXXXX.com (Port: 22)
. 2012-06-27 21:00:01.108 User name: XXXX (Password: Yes, Key file: No)
. 2012-06-27 21:00:01.108 Tunnel: No
. 2012-06-27 21:00:01.108 Transfer Protocol: SFTP
. 2012-06-27 21:00:01.108 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2012-06-27 21:00:01.108 Proxy: none
. 2012-06-27 21:00:01.108 SSH protocol version: 2; Compression: No
. 2012-06-27 21:00:01.108 Bypass authentication: No
. 2012-06-27 21:00:01.108 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2012-06-27 21:00:01.108 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2012-06-27 21:00:01.108 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2012-06-27 21:00:01.108 SFTP Bugs: -,-
. 2012-06-27 21:00:01.108 Return code variable: Autodetect; Lookup user groups: Yes
. 2012-06-27 21:00:01.108 Shell: default
. 2012-06-27 21:00:01.108 EOL: 0, UTF: 2
. 2012-06-27 21:00:01.108 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2012-06-27 21:00:01.108 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2012-06-27 21:00:01.108 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2012-06-27 21:00:01.108 Cache directory changes: Yes, Permanent: Yes
. 2012-06-27 21:00:01.108 DST mode: 1
. 2012-06-27 21:00:01.108 --------------------------------------------------------------------------
. 2012-06-27 21:00:01.108 Looking up host "XXXX.XXXXXX.com"
. 2012-06-27 21:00:01.202 Connecting to XXXX.XXX.XXX.XXX port 22
. 2012-06-27 21:00:02.045 Server version: SSH-2.0-1.36_sshlib GlobalSCAPE
. 2012-06-27 21:00:02.045 We believe remote version ignores SSH-2 maximum packet size
. 2012-06-27 21:00:02.045 We believe remote version has SSH-2 ignore bug
. 2012-06-27 21:00:02.045 Using SSH protocol version 2
. 2012-06-27 21:00:02.045 We claim version: SSH-2.0-WinSCP_release_4.3.5
. 2012-06-27 21:00:04.452 Doing Diffie-Hellman group exchange
. 2012-06-27 21:00:04.686 Doing Diffie-Hellman key exchange with hash SHA-1
. 2012-06-27 21:00:04.827 Host key fingerprint is:
. 2012-06-27 21:00:04.827 ssh-dss 1024 XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
. 2012-06-27 21:00:04.827 Initialised AES-128 CBC client->server encryption
. 2012-06-27 21:00:04.827 Initialised HMAC-SHA1 client->server MAC algorithm
. 2012-06-27 21:00:04.827 Initialised AES-128 CBC server->client encryption
. 2012-06-27 21:00:04.827 Initialised HMAC-SHA1 server->client MAC algorithm
! 2012-06-27 21:00:05.108 Using username "XXXX".
. 2012-06-27 21:00:05.186 Prompt (7, SSH password, , &Password: )
. 2012-06-27 21:00:05.249 Using stored password.
. 2012-06-27 21:00:05.249 Sent password
. 2012-06-27 21:00:05.967 Access granted
. 2012-06-27 21:00:06.030 Opened channel for session
. 2012-06-27 21:00:06.311 Started a shell/command
. 2012-06-27 21:00:06.311 --------------------------------------------------------------------------
. 2012-06-27 21:00:06.311 Using SFTP protocol.
. 2012-06-27 21:00:06.311 Doing startup conversation with host.
> 2012-06-27 21:00:06.311 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2012-06-27 21:00:06.374 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2012-06-27 21:00:06.374 SFTP version 3 negotiated.
. 2012-06-27 21:00:06.374 We believe the server has signed timestamps bug
. 2012-06-27 21:00:06.374 We will use UTF-8 strings for status messages only
. 2012-06-27 21:00:06.374 Getting current directory name.
. 2012-06-27 21:00:06.374 Getting real path for '.'
> 2012-06-27 21:00:06.374 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2012-06-27 21:00:06.436 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2012-06-27 21:00:06.436 Real path is '/'
. 2012-06-27 21:00:06.436 Startup conversation with host finished.
< 2012-06-27 21:00:06.436 Script: Active session: [1]
[email protected]
> 2012-06-27 21:00:06.436 Script: option transfer binary
< 2012-06-27 21:00:06.436 Script: transfer binary
> 2012-06-27 21:00:06.436 Script: lcd "\\NTS02\InsightCS\ERA\Files To Export"
< 2012-06-27 21:00:06.514 Script: \\NTS02\InsightCS\ERA\Files To Export
> 2012-06-27 21:00:06.514 Script: cd "/"
. 2012-06-27 21:00:06.514 Cached directory change via "/" to "/".
. 2012-06-27 21:00:06.514 Getting current directory name.
< 2012-06-27 21:00:06.514 Script: /
> 2012-06-27 21:00:06.514 Script: put -delete -nopreservetime -nopermissions *.835
. 2012-06-27 21:00:06.530 Copying 10 files/directories to remote directory "/"
. 2012-06-27 21:00:06.530 PrTime: No; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 01; Resume: S (102400); CalcS: No; Mask:
. 2012-06-27 21:00:06.530 TM: B; ClAr: No; CPS: 0; ExclM(No):
. 2012-06-27 21:00:06.530 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2012-06-27 21:00:06.530 File: "108368554_ERA_835_4010_20120619.835"
. 2012-06-27 21:00:06.530 Copying "108368554_ERA_835_4010_20120619.835" to remote directory started.
. 2012-06-27 21:00:06.530 Binary transfer mode selected.
. 2012-06-27 21:00:06.530 Opening remote file.
> 2012-06-27 21:00:06.530 Type: SSH_FXP_OPEN, Size: 61, Number: 259
< 2012-06-27 21:00:06.592 Type: SSH_FXP_HANDLE, Size: 10, Number: 259
> 2012-06-27 21:00:06.624 Type: SSH_FXP_WRITE, Size: 3553, Number: 774
> 2012-06-27 21:00:06.624 Type: SSH_FXP_CLOSE, Size: 10, Number: 1028
< 2012-06-27 21:00:07.171 Type: SSH_FXP_STATUS, Size: 21, Number: 774
< 2012-06-27 21:00:07.171 Type: SSH_FXP_STATUS, Size: 21, Number: 1028
< 2012-06-27 21:00:07.171 Status code: 0
. 2012-06-27 21:00:07.171 File: "108431845_ERA_835_4010_20120620.835"
. 2012-06-27 21:00:07.171 Copying "108431845_ERA_835_4010_20120620.835" to remote directory started.
. 2012-06-27 21:00:07.171 Binary transfer mode selected.
. 2012-06-27 21:00:07.171 Checking existence of file.
> 2012-06-27 21:00:07.171 Type: SSH_FXP_LSTAT, Size: 45, Number: 1287
< 2012-06-27 21:00:07.233 Type: SSH_FXP_STATUS, Size: 33, Number: 1287
< 2012-06-27 21:00:07.296 Status code: 2
. 2012-06-27 21:00:07.296 Checking existence of partially transfered file.
> 2012-06-27 21:00:07.296 Type: SSH_FXP_LSTAT, Size: 54, Number: 1543
< 2012-06-27 21:00:07.374 Type: SSH_FXP_STATUS, Size: 33, Number: 1543
< 2012-06-27 21:00:07.374 Status code: 2
. 2012-06-27 21:00:07.374 Opening remote file.
> 2012-06-27 21:00:07.374 Type: SSH_FXP_OPEN, Size: 70, Number: 1795
< 2012-06-27 21:00:07.483 Type: SSH_FXP_HANDLE, Size: 10, Number: 1795
> 2012-06-27 21:00:07.780 Type: SSH_FXP_WRITE, Size: 4118, Number: 2310
. 2012-06-27 21:00:21.421 87 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2012-06-27 21:00:21.421 Type: SSH_FXP_CLOSE, Size: 10, Number: 13828
< 2012-06-27 21:00:21.546 Type: SSH_FXP_STATUS, Size: 21, Number: 13318
< 2012-06-27 21:00:22.577 Type: SSH_FXP_STATUS, Size: 21, Number: 13574
< 2012-06-27 21:00:22.577 Type: SSH_FXP_STATUS, Size: 21, Number: 13828
< 2012-06-27 21:00:22.577 Status code: 0
> 2012-06-27 21:00:22.577 Type: SSH_FXP_RENAME, Size: 94, Number: 14098
< 2012-06-27 21:00:23.874 Type: SSH_FXP_STATUS, Size: 33, Number: 14098
< 2012-06-27 21:00:23.874 Status code: 2, Message: 14098, Server: File not found, Language: en
* 2012-06-27 21:00:23.890 (ETerminal) No such file or directory.
* 2012-06-27 21:00:23.890 Error code: 2
* 2012-06-27 21:00:23.890 Error message from server (en): File not found
* 2012-06-27 21:00:23.890 Request code: 18
. 2012-06-27 21:00:23.890 Asking user:
. 2012-06-27 21:00:23.890 Transfer was succesfully finished, but temporary transfer file '108431845_ERA_835_4010_20120620.835.filepart' could not be renamed to target file name '108431845_ERA_835_4010_20120620.835'. If the problem persists, you may try to turn off transfer resume support. ("No such file or directory.
. 2012-06-27 21:00:23.890 Error code: 2
. 2012-06-27 21:00:23.890 Error message from server (en): File not found
. 2012-06-27 21:00:23.890 Request code: 18")
* 2012-06-27 21:00:23.890 (EScpSkipFile) Transfer was succesfully finished, but temporary transfer file '108431845_ERA_835_4010_20120620.835.filepart' could not be renamed to target file name '108431845_ERA_835_4010_20120620.835'. If the problem persists, you may try to turn off transfer resume support.
* 2012-06-27 21:00:23.890 No such file or directory.
* 2012-06-27 21:00:23.890 Error code: 2
* 2012-06-27 21:00:23.890 Error message from server (en): File not found
* 2012-06-27 21:00:23.890 Request code: 18
. 2012-06-27 21:00:23.890 Script: Failed
. 2012-06-27 21:00:23.890 Closing connection.
. 2012-06-27 21:00:23.890 Sending special code: 12
. 2012-06-27 21:00:23.890 Sent EOF message