Topic " not returning the prompt"

Author Message


I am doing somthing very simple: I have a batch upload.bat
Code: /script="upload.txt"
if %ERRORLEVEL% neq 0 goto error
echo Success
blat -body "OK" -subject "WinSCP Success" -to recipient@domain.tld
exit 0
echo Error!
blat -body "FEHLER" -subject "WinSCP Fehler" -to recipient@domain.tld
exit 1

and the script file
# 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

Basically, it works. The Problem is that winscp after execution won't return the prompt to the batch (it does not terminate) and batch processing stops.
I can not figure out what ist wrong.

Thank you in advance for help
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26299
Location: Prague, Czechia
You have to add an exit command.
Martin Prikryl

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License