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

Jaredt

Could this be similar to my "zero byte uploads" issue?

I am still unalbe to upload files over FTPS using a SOCKS5 proxy. Directory listings and downloads seem to work OK. see:

https://winscp.net/forum/viewtopic.php?t=11508

which I have updated.
martin

Re: There is no valid returncode when aborting ftp(s) transfer

This bug has been added to the tracker:
https://winscp.net/tracker/953
martin

Try:
call "%CurrentDrive%:\Program Files\WinSCP\winscp.com" /log=%log% /command "option batch abort" "option confirm" "open %session%"  "ls %dir%" "exit" > %out%
Niko

There are two Logs. Sending both
martin

Ok, please attach a complete session log file.
Niko

That's interesting. In our CMD File we use:
...
call "%CurrentDrive%:\Program Files\WinSCP\winscp.com" %session% /log=%log% /command "option batch abort" "option confirm *off" "ls %dir%" "exit" > %out%
 
echo errorlevel=%errorlevel%
 
if %errorlevel%==0 goto ok
 
:nok
exit %errorlevel%
 
:ok
exit 0

and in in the Logfile is:
WinSCP Version 5.1.1 (Build 2735) (OS 5.1.2600 Service Pack 3)
. 2012-11-14 15:14:11.905 Configuration: C:\Program Files\WinSCP\WinSCP.ini
. 2012-11-14 15:14:11.905 Local account: XXXX
. 2012-11-14 15:14:11.905 Working directory: C:\Batch\Pgm
. 2012-11-14 15:14:11.905 Command-line: "C:\Program *Files\WinSCP\WinSCP.exe" /console=511 /consoleinstance=_3560_845 "XXX@XXX" "/log=c:\XXX\Log\XXX.Log.txt" "/command" "option *batch abort" "option confirm off" "ls /BAGJAS_Test" "exit"

We have used in the beginning already winscp.com. Do we have to change a setting on the winscp.ini?
Niko

echo errorlevel=%errorlevel%
 
if %errorlevel%==0 goto ok
 
:nok
exit %errorlevel%
 
:ok
exit 0
martin

Re: There is no valid returncode when aborting ftp(s) transfer

How do you test for exit code?
Niko

There is no valid returncode when aborting ftp(s) transfer

Hello dear WinSCP Team

We are using WinSCP in batch mode and working with return codes to determine, if a file transfer was valid.
We got some complaints that some of the files where never been transferred, but we never got an errormessage returned. We found afterwards the error, when we checked the
Log-File, but we can't check every Log-File manually.

Our problem can be replicated when we tried to connect to a host, which is required a certificate and a popup window appears. WinSCP closes (cancel) the Window after some time
and ends without a transfer (which is totally correct). Unfotunately, we can't determine, without return codes, if the transfer was successful or not.

Is there a possibility to activate return codes in WinSCP? So we could check if the Host, path, file, certificate, etc. are missing or if everything went well?

Command-line:
"C:\Program Files\WinSCP\WinSCP.exe" /console=511 /consoleinstance=_3560_845 "XXX@XXX.XXX.XX" "/log=c:\XX.Log.txt" "/command" "option batch abort" "option confirm off" "ls /Test_Test" "exit"

Using Batch-Command-Line, WinSCP 5.1.1 Windows OS: Various (same problem)

Kind regards

Niko Balomatis