Re: Bat/Script file not working
Run batch file as Administrator.
Make sure you remove the extra spaces beyond the ^.
I copied his script and pasted it into notepad and each line has an extra space at the end so if you copied his script, saved it without changing anything and tried running it, I'm sure it would fail.
^
's in my post. But unfortunately, it is rendered with spaces.
C:\Users\PC0102\Desktop\cz2\WinSCP\winscp.com ^
/command ^
option batch off ^
option confirm on ^
open ftps://*:*@datatransfer.cz.nl ^
CD Incassopartner2CZ ^
CD Input ^
put C:\Users\PC0102\Desktop\cz2\Bestanden\ /prc/Incassopartner2CZ/Input ^
C:\Users\PC0102\Desktop\cz2\WinSCP\winscp.com ^
/command ^
"option batch off" ^
"option confirm on" ^
"open ftps://*:*@datatransfer.cz.nl" ^
"CD Incassopartner2CZ" ^
"CD Input" ^
"put C:\Users\PC0102\Desktop\cz2\Bestanden\ /prc/Incassopartner2CZ/Input" ^
"exit"
exit
command.
^
. That's not allowed. The ^
must be the very last character on the line.
^
's in the batch file.
upload.bat
:
cmd.exe
) and type:
type upload.bat
upload.bat
.bat
file, exactly.
upload.txt
involved.
^
's are a batch file syntax. It does not work in the cmd.exe
console. If you want to test it, add the command to a batch file and execute that.
cmd.exe
console, you have to remove the ^
and put everything on a single line.
"C:\Program Files\WinSCP\WinSCP.com" ^
/log="C:\Users\PC0102\Desktop\cz2\WinSCP.log" /ini=nul /loglevel=2* ^
/command ^
"option batch continue" ^
"option confirm on" ^
"open ftps://PRC:*@datatransfer.cz.nl" ^
"CD Incassopartner2CZ" ^
"CD Input" ^
"put C:\Users\PC0102\Desktop\cz2\Bestanden\* /prc/Incassopartner2CZ/Input/" ^
"exit"