Topic "How to close WinSCP batch file"

Author Message
dwilson9@charter.net
[View user's profile]

Joined: 2015-06-25
Posts: 2
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 (18.5 KB)

Description: (none)

WINSCP.PNG

Advertisements
Guest




Add an "exit" Smile
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26572
Location: Prague, Czechia
That's correct, use exit command:
https://winscp.net/eng/docs/scriptcommand_exit
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26572
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.
Advertisements

You can post new topics in this forum






Search

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