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

martin

Re: automizing the download of files using bat file

My guess is that you have a space after the ^.
But that's difficult to tell as those might be lost when posting the message.

See https://winscp.net/eng/docs/faq_batch_file

Attach the script file instead, if this does not help.
Guest_12

automizing the download of files using bat file

hi guys

I need to download zip folder using sftp.. for which i made .bat file which is passing username and password with the details of file to get downloaded..

see the .bat file code:-

winscp.com /command ^
"Open sftp://username:password@website.com/" ^
"get foldername.zip" ^
"exit"

but while running .bat file from command prompt.. Connection get established but after that getting an error:-

See the error below:-

Starting the session...
Session started.
Active session: [1] usernam@website.com
Unknown command '^'.

C:\Program Files (x86)\WinSCP>get foldername.zip "exit"
'get' is not recognized as an internal or external command,
operable program or batch file.

Could you please help me what mistake has been done in the .bat script
Regards