Topic "Command line and Exit Code 1"

Author Message
sergio77
[View user's profile]

Joined: 2016-09-07
Posts: 2
Location: Italy
Hi all,

this is my first post in this forum (so don't kill me please) Smile

This is the question:

I prepared a simple scheduled task to download some files from ad FTPS Server.

This is the code:
...
echo open ftp://XXXXX:YYYYY@10.10.10.10:990 -explicittls -certificate="......"> auto.txt
echo get file1.txt %HOME%\file1.txt>> auto.txt
echo get file2.txt %HOME%\file2.txt>> auto.txt
echo get file3.txt %HOME%\file3.txt>> auto.txt
echo quit>> auto.txt
winscp.exe /script=auto.txt /log=ftps.log
...
Script is working fine (if all 3 files exist), if (for example) file2.txt doesn't exist script stop with an error (Exit Code 1) and it doesn't try to download file3.txt....

This is the LOG:

2016-09-06 12.26.17.525 Listing file "file2.txt".
2016-09-06 12.26.17.525 Recupero informazioni file in corso...
2016-09-06 12.26.17.525 MLST file2.txt
2016-09-06 12.26.17.556 550 File or directory not found.
2016-09-06 12.26.17.556 Impossibile recuperare informazioni sul file
2016-09-06 12.26.17.556 Script: Impossibile ottenere attributi del file 'destinazioni.txt'.
2016-09-06 12.26.17.556 Script: Impossibile recuperare informazioni sul file
2016-09-06 12.26.17.556 File or directory not found.
2016-09-06 12.26.17.556 Script: Failed
2016-09-06 12.26.17.556 Script: Exit code: 1
2016-09-06 12.26.17.556 Disconnessione dal server

How can I fix this error?

Thanks
Sergio
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Use the option batch continue
https://winscp.net/eng/docs/scriptcommand_option
sergio77
[View user's profile]

Joined: 2016-09-07
Posts: 2
Location: Italy
martin wrote:


Thanks a lot.

Bye
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License