martin wrote:
I have sent you an email with a development version of WinSCP to address you have used to register on this forum.
Hello,
I tried this again with the version of WinSCP you sent me. It did not return any value for an exit code this time, though perhaps that was intentional on your part, since the exit code now appears in the log file.
No exit code:
PS C:\Scripts> $lastexitcode -eq $null
True
Log File:
. 2012-05-22 14:32:45.449 --------------------------------------------------------------------------
. 2012-05-22 14:32:45.449 WinSCP Version 5.0.7 (Build 2304) (OS 6.1.7601 Service Pack 1)
. 2012-05-22 14:32:45.450 Configuration: C:\Program Files (x86)\WinSCP\WinSCP.ini
. 2012-05-22 14:32:45.450 Local account: domainUS\user
. 2012-05-22 14:32:45.450 Login time: Tuesday, May 22, 2012 2:32:45 PM
. 2012-05-22 14:32:45.450 --------------------------------------------------------------------------
. 2012-05-22 14:32:45.450 Session name: ftpuser@ftp.domain.net (Ad-Hoc session)
. 2012-05-22 14:32:45.450 Host name: ftp.domain.net (Port: 21)
. 2012-05-22 14:32:45.450 User name: ftpuser (Password: Yes, Key file: No)
. 2012-05-22 14:32:45.450 Tunnel: No
. 2012-05-22 14:32:45.450 Transfer Protocol: FTP
. 2012-05-22 14:32:45.450 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2012-05-22 14:32:45.450 Proxy: none
. 2012-05-22 14:32:45.450 FTP: FTPS: None; Passive: Yes [Force IP: No]
. 2012-05-22 14:32:45.450 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2012-05-22 14:32:45.450 Cache directory changes: Yes, Permanent: Yes
. 2012-05-22 14:32:45.450 DST mode: 1
. 2012-05-22 14:32:45.450 --------------------------------------------------------------------------
. 2012-05-22 14:32:45.457 Connecting to ftp.domain.net ...
. 2012-05-22 14:32:45.460 Connected with ftp.domain.net. Waiting for welcome message...
< 2012-05-22 14:32:45.460 220 Microsoft FTP Service
> 2012-05-22 14:32:45.460 USER ftpuser
< 2012-05-22 14:32:45.461 331 Password required for ftpuser.
> 2012-05-22 14:32:45.461 PASS *********
< 2012-05-22 14:32:45.462 230 User ftpuser logged in.
> 2012-05-22 14:32:45.462 SYST
< 2012-05-22 14:32:45.462 215 Windows_NT
> 2012-05-22 14:32:45.462 FEAT
< 2012-05-22 14:32:45.463 211-FEAT
< 2012-05-22 14:32:45.660 SIZE
< 2012-05-22 14:32:45.660 MDTM
< 2012-05-22 14:32:45.660 211 END
. 2012-05-22 14:32:45.661 Connected
. 2012-05-22 14:32:45.661 --------------------------------------------------------------------------
. 2012-05-22 14:32:45.661 Using FTP protocol.
. 2012-05-22 14:32:45.662 Doing startup conversation with host.
> 2012-05-22 14:32:45.663 PWD
< 2012-05-22 14:32:45.664 257 "/ftpuser" is current directory.
. 2012-05-22 14:32:45.664 Getting current directory name.
. 2012-05-22 14:32:45.665 Startup conversation with host finished.
< 2012-05-22 14:32:45.665 Script: Active session: [1] ftpuser@ftp.domain.net
> 2012-05-22 14:32:45.666 Script: option batch abort
< 2012-05-22 14:32:45.666 Script: batch abort
> 2012-05-22 14:32:45.667 Script: option confirm off
< 2012-05-22 14:32:45.667 Script: confirm off
> 2012-05-22 14:32:45.667 Script: put \\domain.net\common\share\IT_Operations\ftptest\*.txt
. 2012-05-22 14:32:45.720 Copying 1 files/directories to remote directory "/ftpuser"
. 2012-05-22 14:32:45.720 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask:
. 2012-05-22 14:32:45.720 TM: M; ClAr: No; CPS: 0; InclM:
. 2012-05-22 14:32:45.720 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2012-05-22 14:32:45.758 File: "\\domain.net\common\share\IT_Operations\ftptest\foo.txt"
. 2012-05-22 14:32:45.760 Copying "\\domain.net\common\share\IT_Operations\ftptest\foo.txt" to remote directory started.
. 2012-05-22 14:32:45.761 Ascii transfer mode selected.
. 2012-05-22 14:32:45.761 Starting upload of \\domain.net\common\share\IT_Operations\ftptest\foo.txt
> 2012-05-22 14:32:45.761 TYPE A
< 2012-05-22 14:32:45.761 200 Type set to A.
> 2012-05-22 14:32:45.761 PASV
< 2012-05-22 14:32:45.762 227 Entering Passive Mode (10,95,201,21,18,219).
> 2012-05-22 14:32:45.763 LIST
< 2012-05-22 14:32:45.764 125 Data connection already open; Transfer starting.
< 2012-05-22 14:32:45.963 226 Transfer complete.
> 2012-05-22 14:32:45.971 TYPE A
< 2012-05-22 14:32:45.972 200 Type set to A.
> 2012-05-22 14:32:45.972 PASV
< 2012-05-22 14:32:45.972 227 Entering Passive Mode (10,95,201,21,18,220).
> 2012-05-22 14:32:45.975 STOR foo.txt
< 2012-05-22 14:32:45.976 125 Data connection already open; Transfer starting.
< 2012-05-22 14:32:46.174 226 Transfer complete.
. 2012-05-22 14:32:46.174 Upload successful
> 2012-05-22 14:32:46.174 Script: exit
. 2012-05-22 14:32:46.174 Script: Exit code: 0
. 2012-05-22 14:32:46.177 Disconnected from server
[/code]