Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Spagnot

Re: WinSCP console window not closing

Spagnot wrote:

I have a batch file that works well it's just that I have to type exit and press enter to close it and finish it's processes.
I have it download a file from an ftp site, copy it to my computer, then copies it to a different ftp location. This works fine automatically.
In the same batch file, after my 'put' command I then have:

move "C:\Users\name\Desktop\scp\testt\me1.xls" C:\Users\name\Desktop\scp\testt\backup\
RENAME "C:\Users\name\Desktop\scp\testt\backup\me1.xls" "%Date:~-4,4%-%Date:~-10,2%-%Date:~-7,2%_%time:~0,2%%time:~3,2%%time:~6,2%me1.xls"
exit

In order to have the file moved and renamed, I have to type exit and press enter in the console window. Is there anyway to do this automatically and close the console window?


Wow... All I needed was an "exit" command on the same line as the ftp transfer coding line. Never mind people! Wow I'm good at figuring stuff out myself...
Spagnot

WinSCP console window not closing

I have a batch file that works well it's just that I have to type exit and press enter to close it and finish it's processes.
I have it download a file from an ftp site, copy it to my computer, then copies it to a different ftp location. This works fine automatically.
In the same batch file, after my 'put' command I then have:

move "C:\Users\name\Desktop\scp\testt\me1.xls" C:\Users\name\Desktop\scp\testt\backup\
RENAME "C:\Users\name\Desktop\scp\testt\backup\me1.xls" "%Date:~-4,4%-%Date:~-10,2%-%Date:~-7,2%_%time:~0,2%%time:~3,2%%time:~6,2%me1.xls"
exit

In order to have the file moved and renamed, I have to type exit and press enter in the console window. Is there anyway to do this automatically and close the console window?