WinScp Windows Task Scheduler

59 Views Asked by At

I want to transfer files from my local server to the remote server with IP:192.168.0.0 and user: Administrator and password:password.

However, i have some issues: Check images.

The script: /log=C:\winscplog\winscp.log /command "open ftp://Administrator:[email protected]/" "put C:\Banks Work Folder\CQUR\Schedules\SenderDir* /C/Users/Administrator/Karam/TragetDir" "exit"

enter image description here enter image description here enter image description here

what can I do? Please help!

I tried changing the path but nothing happened

1

There are 1 best solutions below

0
Martin Prikryl On

Start by testing your command standalone (not from Task Scheduler). You would see that it does not work at all, so the problem has nothing to do with the Task Scheduler.

At the very least, your command has problems with quotes, as your source local path contains spaces. The correct syntax is:

"put ""C:\Banks Work Folder\CQUR\Schedules\SenderDir*"" /C/Users/Administrator/Karam/TragetDir"

Note the double double-quotes around the source local path (""..."").
See https://winscp.net/eng/docs/commandline#syntax


If it turns out, that this is not the only problem, see WinSCP article Debugging transfer task running in Windows Scheduler, SSIS, or another automation service.

And indeed, the "The directory name is invalid" possibly shows that you have yet another problem. Do you even have WinSCP installed into the C:\Program Files (x86)\WinSCP\WinSCP.exe?