I have a script that creates a log then users WinSCP to upload the log file. I am using the following command syntax:
COMMAND:
winscp.com /ini=nul /log=ftp.log /command "option batch abort" "option confirm off" "open ftp://[username]:[password]@ftp.[company].org:21212/" "put SystemCheck_7501234.log /SystemCheckLogs/*" "exit"
1) sending to this port behind my firewall fails, but it works from outside.(from log results below you can see I can reach this server/port successfully). Some commands like ls, get, put fail.
2) my most relevant concern, however is: the above script prompts me to abort or reconnect even though I specify "option batch abort" Shouldn't this cause it to automatically select "abort"?
COMMAND LINE OUTPUT:
batch abort
confirm off
Connecting to ftp.[company].org:21212 ...
Connected with ftp.[company].org:21212. Waiting for welcome message...
Connected
Starting the session...
Reading remote directory...
Session started.
Active session: [1] [username]@ftp.[company].org
c:SystemCheck_7501234.log | 0 B | 0.0 KiB/s | binary | 0%
Lost connection.
Timeout detected.
Copying files to remote side failed.
(A)bort, (R)econnect (4 s): Abort
Lost connection.
Timeout detected.
Copying files to remote side failed.
Copying files to remote side failed.
Session '[username]@ftp.[company].org' closed.
No session.
DETAILED LOG:
. 2014-05-19 23:26:52.387 --------------------------------------------------------------------------
. 2014-05-19 23:26:52.389 WinSCP Version 5.5.3 (Build 4214) (OS 6.2.9200 - Windows 8 Pro)
. 2014-05-19 23:26:52.389 Configuration: nul
. 2014-05-19 23:26:52.389 Local account: [machine]\[user]
. 2014-05-19 23:26:52.389 Working directory: c:\Users\[user]\Documents\Project - Windows 7 Remote Upgrade\Sandbox
. 2014-05-19 23:26:52.389 Process ID: 3780
. 2014-05-19 23:26:52.389 Command-line: "c:\Users\[user]\Documents\Project - Windows 7 Remote Upgrade\Sandbox\WinSCP.exe" /console=553 /consoleinstance=_2944_617 "/ini=nul" "/log=ftp.log" "/command" "option batch abort" "option confirm off" "open ftp://[username]:[password]@ftp.[company].org:21212/" "put SystemCheck_7501234.log /SystemCheckLogs/*" "exit"
. 2014-05-19 23:26:52.389 Time zone: Current: GMT-4, Standard: GMT-5 (Eastern Standard Time), DST: GMT-4 (Eastern Daylight Time), DST Start: 3/9/2014, DST End: 11/2/2014
. 2014-05-19 23:26:52.389 Login time: Monday, May 19, 2014 11:26:52 PM
. 2014-05-19 23:26:52.389 --------------------------------------------------------------------------
. 2014-05-19 23:26:52.389 Script: Retrospectively logging previous script records:
> 2014-05-19 23:26:52.389 Script: option batch abort
< 2014-05-19 23:26:52.389 Script: batch abort
> 2014-05-19 23:26:52.389 Script: option confirm off
< 2014-05-19 23:26:52.389 Script: confirm off
> 2014-05-19 23:26:52.389 Script: open ftp://[username]:***@ftp.[company].org:21212/
. 2014-05-19 23:26:52.389 --------------------------------------------------------------------------
. 2014-05-19 23:26:52.389 Session name: [username]@ftp.[company].org (Ad-Hoc site)
. 2014-05-19 23:26:52.389 Host name: ftp.[company].org (Port: 21212)
. 2014-05-19 23:26:52.389 User name: [username] (Password: Yes, Key file: No)
. 2014-05-19 23:26:52.389 Tunnel: No
. 2014-05-19 23:26:52.389 Transfer Protocol: FTP
. 2014-05-19 23:26:52.389 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2014-05-19 23:26:52.389 Proxy: none
. 2014-05-19 23:26:52.389 Send buffer: 262144
. 2014-05-19 23:26:52.389 FTP: FTPS: None; Passive: Yes [Force IP: A]; MLSD: A [List all: A]
. 2014-05-19 23:26:52.389 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2014-05-19 23:26:52.389 Cache directory changes: Yes, Permanent: Yes
. 2014-05-19 23:26:52.389 DST mode: 1; Timezone offset: 0h 0m
. 2014-05-19 23:26:52.389 --------------------------------------------------------------------------
. 2014-05-19 23:26:52.392 Connecting to ftp.[company].org:21212 ...
. 2014-05-19 23:26:52.399 Connected with ftp.[company].org:21212. Waiting for welcome message...
< 2014-05-19 23:26:52.399 220 Microsoft FTP Service
> 2014-05-19 23:26:52.399 USER [username]
< 2014-05-19 23:26:52.399 331 Password required for [username].
> 2014-05-19 23:26:52.399 PASS *********
< 2014-05-19 23:26:52.399 230 User logged in.
> 2014-05-19 23:26:52.399 SYST
< 2014-05-19 23:26:52.399 215 Windows_NT
> 2014-05-19 23:26:52.399 FEAT
< 2014-05-19 23:26:52.399 211-Extended features supported:
< 2014-05-19 23:26:52.399 LANG EN*
< 2014-05-19 23:26:52.399 UTF8
< 2014-05-19 23:26:52.399 AUTH TLS;TLS-C;SSL;TLS-P;
< 2014-05-19 23:26:52.399 PBSZ
< 2014-05-19 23:26:52.399 PROT C;P;
< 2014-05-19 23:26:52.402 CCC
< 2014-05-19 23:26:52.402 HOST
< 2014-05-19 23:26:52.402 SIZE
< 2014-05-19 23:26:52.402 MDTM
< 2014-05-19 23:26:52.402 REST STREAM
< 2014-05-19 23:26:52.402 211 END
> 2014-05-19 23:26:52.402 OPTS UTF8 ON
< 2014-05-19 23:26:52.402 200 OPTS UTF8 command successful - UTF8 encoding now ON.
. 2014-05-19 23:26:52.402 Connected
. 2014-05-19 23:26:52.402 --------------------------------------------------------------------------
. 2014-05-19 23:26:52.402 Using FTP protocol.
. 2014-05-19 23:26:52.402 Doing startup conversation with host.
> 2014-05-19 23:26:52.402 PWD
< 2014-05-19 23:26:52.402 257 "/" is current directory.
. 2014-05-19 23:26:52.402 Getting current directory name.
. 2014-05-19 23:26:52.402 Startup conversation with host finished.
< 2014-05-19 23:26:52.402 Script: Active session: [1] [username]@ftp.[company].org
> 2014-05-19 23:26:52.404 Script: put SystemCheck_7501234.log /SystemCheckLogs/*
. 2014-05-19 23:26:52.404 Copying 1 files/directories to remote directory "/SystemCheckLogs/"
. 2014-05-19 23:26:52.404 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask: *
. 2014-05-19 23:26:52.404 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM:
. 2014-05-19 23:26:52.404 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2014-05-19 23:26:52.404 File: SystemCheck_7501234.log' [2014-05-20T03:11:30.649Z] [13526]
. 2014-05-19 23:26:52.404 Copying "SystemCheck_7501234.log" to remote directory started.
. 2014-05-19 23:26:52.404 Binary transfer mode selected.
. 2014-05-19 23:26:52.404 Starting upload of SystemCheck_7501234.log
> 2014-05-19 23:26:52.404 CWD /SystemCheckLogs/
< 2014-05-19 23:26:52.404 250 CWD command successful.
> 2014-05-19 23:26:52.404 PWD
< 2014-05-19 23:26:52.407 257 "/SystemCheckLogs" is current directory.
> 2014-05-19 23:26:52.407 TYPE A
< 2014-05-19 23:26:52.407 200 Type set to A.
> 2014-05-19 23:26:52.407 PASV
< 2014-05-19 23:26:52.407 227 Entering Passive Mode (63,101,179,76,16,94).
> 2014-05-19 23:26:52.407 LIST
< 2014-05-19 23:26:52.407 150 Opening ASCII mode data connection.
. 2014-05-19 23:27:07.590 Timeout detected.
. 2014-05-19 23:27:07.590 Copying files to remote side failed.
. 2014-05-19 23:27:07.590 Connection was lost, asking what to do.
. 2014-05-19 23:27:07.590 Asking user:
. 2014-05-19 23:27:07.590 Lost connection. ("Timeout detected.","Copying files to remote side failed.")
< 2014-05-19 23:27:07.590 Script: Lost connection.
< 2014-05-19 23:27:07.590 Script: Timeout detected.
< 2014-05-19 23:27:07.590 Copying files to remote side failed.
< 2014-05-19 23:27:08.662 Script: Lost connection.
< 2014-05-19 23:27:08.662 Script: Timeout detected.
< 2014-05-19 23:27:08.662 Copying files to remote side failed.
< 2014-05-19 23:27:08.662 Copying files to remote side failed.