Hi,
I have below WinSCP batch script that out of the blue (for me, but of course somewhere something did change) is not working anymore.
option echo on
option batch abort
option confirm off
open Connections/Cargo-P
lcd \\NLS9809\Hns-Apps\CarGoKb\naar_website\
cd "/content_www.mysite.nl/import/Delivery Exception Dates/Drop folder/"
put CarGoExceptionDates.xml
exit
It's the 'put' command that does not work anymore.
If I compare the log with the last run that went ok then the lines from below point are different.
. 2014-11-19 15:12:00.821 Copying files to remote side failed.
. 2014-11-19 15:12:00.821 Got reply 2004 to the command 4
* 2014-11-19 15:12:00.822 (ExtException) **Copying files to remote side failed.**
. 2014-11-19 15:12:00.822 Asking user:
. 2014-11-19 15:12:00.822 Error transferring file 'CargoExceptionDates.xml'. ("Copying files to remote side failed.")
< 2014-11-19 15:12:00.822 Script: Error transferring file 'CargoExceptionDates.xml'.
< 2014-11-19 15:12:00.822 Script: Copying files to remote side failed.
* 2014-11-19 15:12:00.824 (EScpSkipFile) Error transferring file 'CargoExceptionDates.xml'.
* 2014-11-19 15:12:00.824 Copying files to remote side failed.
. 2014-11-19 15:12:00.824 Script: Failed
. 2014-11-19 15:12:00.824 Session upkeep
. 2014-11-19 15:12:00.824 Script: Exit code: 1
. 2014-11-19 15:12:00.825 Got reply 1004 to the command 4
. 2014-11-19 15:12:00.825 Disconnected from server
The strange thing is that when I run WinSCP interactive using the same connection (Connections/Cargo-P) I can just copy that file to the target location.
The complete log is:
. 2014-11-19 15:11:58.895 --------------------------------------------------------------------------
. 2014-11-19 15:11:58.895 WinSCP Version 5.5.6 (Build 4746) (OS 6.1.7601 Service Pack 1 - Windows Server 2008 R2 Standard)
. 2014-11-19 15:11:58.896 Configuration: D:\Apps\WinSCP\WinSCP.ini
. 2014-11-19 15:11:58.896 Local account: NL\svcnlgits
. 2014-11-19 15:11:58.896 Working directory: C:\Windows\system32
. 2014-11-19 15:11:58.896 Process ID: 3504
. 2014-11-19 15:11:58.896 Command-line: "D:\Apps\WinSCP\WinSCP.exe" /console=556 /consoleinstance=_3784_727 "/script=d:\Data\Scripts\Cargo-P-1.winscp" "/log=d:\Data\Logs\Cargo-P-1\Cargo-P-1.log" "/xmllog=d:\Data\Logs\XML\Cargo-P-1_20141119_151158.xml"
. 2014-11-19 15:11:58.896 Time zone: Current: GMT+1, Standard: GMT+1 (W. Europe Standard Time), DST: GMT+2 (W. Europe Daylight Time), DST Start: 30-3-2014, DST End: 26-10-2014
. 2014-11-19 15:11:58.896 Login time: woensdag 19 november 2014 15:11:58
. 2014-11-19 15:11:58.896 --------------------------------------------------------------------------
. 2014-11-19 15:11:58.896 Script: Retrospectively logging previous script records:
> 2014-11-19 15:11:58.896 Script: option echo on
< 2014-11-19 15:11:58.896 Script: echo on
> 2014-11-19 15:11:58.896 Script: option batch abort
< 2014-11-19 15:11:58.896 Script: option batch abort
< 2014-11-19 15:11:58.896 Script: batch abort
> 2014-11-19 15:11:58.896 Script: option confirm off
< 2014-11-19 15:11:58.896 Script: option confirm off
< 2014-11-19 15:11:58.896 Script: confirm off
> 2014-11-19 15:11:58.896 Script: open Connections/Cargo-P
< 2014-11-19 15:11:58.896 Script: open Connections/Cargo-P
. 2014-11-19 15:11:58.897 --------------------------------------------------------------------------
. 2014-11-19 15:11:58.897 Session name: Connections/Cargo-P (Site)
. 2014-11-19 15:11:58.897 Host name: agencyftp.mysite.com (Port: 990)
. 2014-11-19 15:11:58.897 User name: hnkweb\srv.ftp.hh.nl (Password: Yes, Key file: No)
. 2014-11-19 15:11:58.897 Tunnel: No
. 2014-11-19 15:11:58.897 Transfer Protocol: FTP
. 2014-11-19 15:11:58.897 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2014-11-19 15:11:58.897 Proxy: none
. 2014-11-19 15:11:58.897 Send buffer: 262144
. 2014-11-19 15:11:58.897 UTF: 2
. 2014-11-19 15:11:58.897 FTP: FTPS: Implicit TLS/SSL; Passive: Yes [Force IP: A]; MLSD: A [List all: A]
. 2014-11-19 15:11:58.897 Session reuse: Yes
. 2014-11-19 15:11:58.897 TLS/SSL versions: TLSv1.0-TLSv1.2
. 2014-11-19 15:11:58.897 Local directory: D:\Data\Defaults\Cargo-P, Remote directory: /content_www.mysite.nl/import/Delivery Exception Dates/Drop folder, Update: No, Cache: No
. 2014-11-19 15:11:58.897 Cache directory changes: No, Permanent: Yes
. 2014-11-19 15:11:58.897 DST mode: 1; Timezone offset: 0h 0m
. 2014-11-19 15:11:58.897 --------------------------------------------------------------------------
. 2014-11-19 15:11:59.096 Loading system certificates
. 2014-11-19 15:11:59.100 Connecting to agencyftp.mysite.com:990 ...
. 2014-11-19 15:11:59.839 TLS layer changed state from unconnected to connecting
. 2014-11-19 15:11:59.878 TLS layer changed state from connecting to connected
. 2014-11-19 15:11:59.878 Connected with agencyftp.mysite.com:990, negotiating TLS connection...
. 2014-11-19 15:11:59.969 TLS connect: SSLv3 read server hello A
. 2014-11-19 15:11:59.969 TLS connect: SSLv3 read server certificate A
. 2014-11-19 15:11:59.969 TLS connect: SSLv3 read server done A
. 2014-11-19 15:11:59.969 TLS connect: SSLv3 write client key exchange A
. 2014-11-19 15:11:59.969 TLS connect: SSLv3 write change cipher spec A
. 2014-11-19 15:11:59.969 TLS connect: SSLv3 write finished A
. 2014-11-19 15:11:59.969 TLS connect: SSLv3 flush data
. 2014-11-19 15:12:00.014 TLS connect: SSLv3 read finished A
. 2014-11-19 15:12:00.014 Verifying certificate for "mysite International" with fingerprint 91:47:d4:ff:36:f3:8e:f5:19:6f:63:ea:c6:85:32:b3:e6:d4:1e:8b
. 2014-11-19 15:12:00.014 Certificate common name "*.mysite.com" matches hostname
. 2014-11-19 15:12:00.016 Certificate for "mysite International" matches cached fingerprint
. 2014-11-19 15:12:00.016 Using TLSv1.2, cipher TLSv1/SSLv3: AES256-SHA256, 2048 bit RSA
. 2014-11-19 15:12:00.017 TLS connection established. Waiting for welcome message...
< 2014-11-19 15:12:00.017 220 Microsoft FTP Service
> 2014-11-19 15:12:00.017 USER hnkweb\srv.ftp.hh.nl
< 2014-11-19 15:12:00.056 331 Password required for hnkweb\srv.ftp.hh.nl.
> 2014-11-19 15:12:00.056 PASS ********
< 2014-11-19 15:12:00.096 230-Directory has 75,912,196,096 bytes of disk space available.
< 2014-11-19 15:12:00.096 230 User logged in.
> 2014-11-19 15:12:00.096 SYST
< 2014-11-19 15:12:00.134 215 Windows_NT
> 2014-11-19 15:12:00.134 FEAT
< 2014-11-19 15:12:00.172 211-Extended features supported:
< 2014-11-19 15:12:00.172 LANG EN*
< 2014-11-19 15:12:00.172 UTF8
< 2014-11-19 15:12:00.172 AUTH TLS;TLS-C;SSL;TLS-P;
< 2014-11-19 15:12:00.172 PBSZ
< 2014-11-19 15:12:00.173 PROT C;P;
< 2014-11-19 15:12:00.173 CCC
< 2014-11-19 15:12:00.173 HOST
< 2014-11-19 15:12:00.173 SIZE
< 2014-11-19 15:12:00.173 MDTM
< 2014-11-19 15:12:00.173 REST STREAM
< 2014-11-19 15:12:00.173 211 END
> 2014-11-19 15:12:00.173 OPTS UTF8 ON
< 2014-11-19 15:12:00.209 200 OPTS UTF8 command successful - UTF8 encoding now ON.
> 2014-11-19 15:12:00.210 PBSZ 0
< 2014-11-19 15:12:00.247 200 PBSZ command successful.
> 2014-11-19 15:12:00.248 PROT P
< 2014-11-19 15:12:00.288 200 PROT command successful.
. 2014-11-19 15:12:00.289 Connected
. 2014-11-19 15:12:00.289 Got reply 1 to the command 1
. 2014-11-19 15:12:00.289 --------------------------------------------------------------------------
. 2014-11-19 15:12:00.289 Using FTP protocol.
. 2014-11-19 15:12:00.289 Doing startup conversation with host.
> 2014-11-19 15:12:00.289 PWD
< 2014-11-19 15:12:00.327 257 "/" is current directory.
. 2014-11-19 15:12:00.327 Got reply 1 to the command 16
. 2014-11-19 15:12:00.328 Changing directory to "/content_www.mysite.nl/import/Delivery Exception Dates/Drop folder".
> 2014-11-19 15:12:00.328 CWD /content_www.mysite.nl/import/Delivery Exception Dates/Drop folder
< 2014-11-19 15:12:00.395 250 CWD command successful.
. 2014-11-19 15:12:00.396 Got reply 1 to the command 16
. 2014-11-19 15:12:00.396 Getting current directory name.
> 2014-11-19 15:12:00.396 PWD
< 2014-11-19 15:12:00.433 257 "/content_www.mysite.nl/import/Delivery Exception Dates/Drop folder" is current directory.
. 2014-11-19 15:12:00.433 Got reply 1 to the command 16
. 2014-11-19 15:12:00.434 Startup conversation with host finished.
< 2014-11-19 15:12:00.434 Script: Active session: [1] Connections/Cargo-P
. 2014-11-19 15:12:00.435 Session upkeep
. 2014-11-19 15:12:00.435 Session upkeep
> 2014-11-19 15:12:00.435 Script: lcd \\NLS9809\Hns-Apps\CarGoKb\naar_website\
< 2014-11-19 15:12:00.435 Script: lcd \\NLS9809\Hns-Apps\CarGoKb\naar_website\
< 2014-11-19 15:12:00.470 Script: \\NLS9809\Hns-Apps\CarGoKb\naar_website
. 2014-11-19 15:12:00.471 Session upkeep
. 2014-11-19 15:12:00.471 Session upkeep
> 2014-11-19 15:12:00.471 Script: cd "/content_www.mysite.nl/import/Delivery Exception Dates/Drop folder/"
< 2014-11-19 15:12:00.471 Script: cd "/content_www.mysite.nl/import/Delivery Exception Dates/Drop folder/"
. 2014-11-19 15:12:00.473 Changing directory to "/content_www.mysite.nl/import/Delivery Exception Dates/Drop folder/".
> 2014-11-19 15:12:00.474 CWD /content_www.mysite.nl/import/Delivery Exception Dates/Drop folder/
< 2014-11-19 15:12:00.515 250 CWD command successful.
. 2014-11-19 15:12:00.515 Got reply 1 to the command 16
. 2014-11-19 15:12:00.515 Getting current directory name.
> 2014-11-19 15:12:00.515 PWD
< 2014-11-19 15:12:00.554 257 "/content_www.mysite.nl/import/Delivery Exception Dates/Drop folder" is current directory.
. 2014-11-19 15:12:00.554 Got reply 1 to the command 16
< 2014-11-19 15:12:00.554 Script: /content_www.mysite.nl/import/Delivery Exception Dates/Drop folder
. 2014-11-19 15:12:00.554 Session upkeep
. 2014-11-19 15:12:00.554 Session upkeep
> 2014-11-19 15:12:00.555 Script: put CarGoExceptionDates.xml
< 2014-11-19 15:12:00.555 Script: put CarGoExceptionDates.xml
. 2014-11-19 15:12:00.579 Copying 1 files/directories to remote directory "/content_www.mysite.nl/import/Delivery Exception Dates/Drop folder"
. 2014-11-19 15:12:00.579 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask:
. 2014-11-19 15:12:00.580 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM:
. 2014-11-19 15:12:00.580 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2014-11-19 15:12:00.590 File: 'CargoExceptionDates.xml' [2014-11-18T15:42:03.615Z] [73]
. 2014-11-19 15:12:00.605 Copying "CargoExceptionDates.xml" to remote directory started.
. 2014-11-19 15:12:00.614 Binary transfer mode selected.
. 2014-11-19 15:12:00.615 Starting upload of CargoExceptionDates.xml
> 2014-11-19 15:12:00.615 TYPE A
< 2014-11-19 15:12:00.653 200 Type set to A.
> 2014-11-19 15:12:00.653 PASV
< 2014-11-19 15:12:00.692 227 Entering Passive Mode (95,211,70,134,193,129).
> 2014-11-19 15:12:00.692 LIST
. 2014-11-19 15:12:00.736 Loading system certificates
. 2014-11-19 15:12:00.736 Trying reuse main TLS session ID
. 2014-11-19 15:12:00.736 TLS layer changed state from none to connected
< 2014-11-19 15:12:00.736 150 Opening ASCII mode data connection.
. 2014-11-19 15:12:00.775 Session ID reused
. 2014-11-19 15:12:00.775 TLS connection established
. 2014-11-19 15:12:00.814 TLS layer changed state from connected to closed
. 2014-11-19 15:12:00.814 <Empty directory listing>
< 2014-11-19 15:12:00.816 226-Directory has 9,304,121,344 bytes of disk space available.
< 2014-11-19 15:12:00.816 226 Transfer complete.
. 2014-11-19 15:12:00.821 Copying files to remote side failed.
. 2014-11-19 15:12:00.821 Got reply 2004 to the command 4
* 2014-11-19 15:12:00.822 (ExtException) **Copying files to remote side failed.**
. 2014-11-19 15:12:00.822 Asking user:
. 2014-11-19 15:12:00.822 Error transferring file 'CargoExceptionDates.xml'. ("Copying files to remote side failed.")
< 2014-11-19 15:12:00.822 Script: Error transferring file 'CargoExceptionDates.xml'.
< 2014-11-19 15:12:00.822 Script: Copying files to remote side failed.
* 2014-11-19 15:12:00.824 (EScpSkipFile) Error transferring file 'CargoExceptionDates.xml'.
* 2014-11-19 15:12:00.824 Copying files to remote side failed.
. 2014-11-19 15:12:00.824 Script: Failed
. 2014-11-19 15:12:00.824 Session upkeep
. 2014-11-19 15:12:00.824 Script: Exit code: 1
. 2014-11-19 15:12:00.825 Got reply 1004 to the command 4
. 2014-11-19 15:12:00.825 Disconnected from server