Reputation: 35
I have written a script to open a session WinSCP via task scheduler. My code is:
open ftpes://user:password @192.168.88.200:3688/
In Task Scheduler, I execute it by specifying:
C:\Program Files (x86)\WinSCP\WinSCP.exe
D:\test.txt
When I trying to execute it, WinSCP opens and shows:
Host 'D' Does not exist.
I saved on script on disk D. Can you help me please with what is wrong?
Upvotes: 1
Views: 7851
Reputation: 202168
To run WinSCP script, use /script=
switch, for example:
"C:\Program Files (x86)\WinSCP\WinSCP.com"
/script="D:\test.txt"
Resources:
You can also have WinSCP GUI generate both the script and batch file for you (or even a batch file that directly contains the WinSCP commands).
Upvotes: 4