Re: winscp.com not returning the prompt
You have to add an
exit
command.
exit
command.
winscp.com /script="upload.txt"
if %ERRORLEVEL% neq 0 goto error
echo Success
blat -body "OK" -subject "WinSCP Success" -to recipient@domain.tld
exit 0
:error
echo Error!
blat -body "FEHLER" -subject "WinSCP Fehler" -to recipient@domain.tld
exit 1
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect to SFTP server using a password
open ftp://user:pass@domain.tld
# Upload new files
synchronize remote -criteria=time -transfer=binary -filemask=*.jpg D:\UPLOAD /IMAGES
# Disconnect
close