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

caprarioa

Re: .bat/script File Error on Windows Server 2019

Thank you for this syntax lesson! This worked perfectly!
martin

Re: .bat/script File Error on Windows Server 2019

It should be two lines. and you also need to quote the paths with spaces:
cd "C:\Program Files (x86)\WinSCP"
winSCP.com /script="C:\Program Files (x86)\WinSCP\autoupload_script.txt"
caprarioa

.bat/script File Error on Windows Server 2019

I have a windows Server 2019 with winscp installed. I have a sftp server I am trying to send a static file to from an internal folder. I have a script (.txt) file and a .bat file. I have searched many forums and no matter what I try I think my knowledge is too limited to correct my errors!

.bat file:
cd C:\Program Files (x86)\WinSCP winSCP.com /script=C:\Program Files (x86)\WinSCP\autoupload_script.txt


Script file:
open sftp://username:password@address.com/
cd E:\folder1\folder2\folder3
put E:\folder1\folder2\folder3\filetobetransfered1.csv
/*.*
exit