How to close WinSCP batch file

Advertisement

dwilson9@charter.net
Joined:
Posts:
2

How to close WinSCP batch file

I have created a batch file for our SFTP process using WinSCP. The batch file and process executes correctly but for some reason after completing the console returns to a winscp prompt and does not close. I have tried adding "close,disconnect,etc." to the batch, but nothing seems to work except manually going in and typing exit. Does anyone know of a way to close down the console once the batch has executed? Thanks.

simple batch

cd\
cd c:\progra~2\WinSCP
winscp.com /script=SFTP.txt
close

WINSCP.PNG

Reply with quote

Advertisement

nchikara
Guest

I am using exit command and it still doesn't exit. I am using PUT command to upload file and right after that I am using exit command and yet WinSCP doesn't close. Any idea why it is happening?

Thanks

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,453
Location:
Prague, Czechia

nchikara wrote:

I am using exit command and it still doesn't exit. I am using PUT command to upload file and right after that I am using exit command and yet WinSCP doesn't close. Any idea why it is happening?
Please start a new thread and attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

Guest

exit is a dos command, close is an ftp command.
use close after you've finished with ftp, and then add an exit to close the batch script.

Reply with quote

Advertisement

You can post new topics in this forum