Re: Batch does not wait for WinSCP FTP script to complete before going to next sommand
Ok that's great. I'll give this a shot and update the thread.
Thanks Martin!
Thanks Martin!
start
command is to start something in a different window and do not wait for it.
start
command.
winscp.com
instead of winscp.exe
.
start winscp.exe /ini=F:\Axios\Test\Automations\Common\EDB_Transfer\WinSCP\WinSCP.ini /command script=F:\Axios\Test\Automations\Common\EDB_Transfer\edb_upload.ftp /parameter ftp.server.my myusername password localfolder destinationftpfolder /Log=F:\Axios\Test\Automations\Common\EDB_Transfer\Logs\FTP_Logs\edb_upload_20220210.log
# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# Connect
open %2%:%3%@%1%
put -nopreservetime
# Change remote directory
# Force binary mode transfer
option transfer binary
# Copy file to the SFTP directory
synchronize remote -filemask="*.pgp*" %4% %5% -delete
# Disconnect
close
exit