System Error. Code: 3
I am new to WinSCP . I have been not been able to figure out a problem for the last 2 days. I have written a WinSCP script that I can call using a bat file. It works file when I manually execute the bat file. However, when I use the Windows Task Scheduler I get an error. The script opens up the sftp, switches to a directory called Nox but when I want to switch to the local mapped directory x:\ I get the error. See script below.
lcd /home/other/Nox
cd X:\
get -delete *
exit
All of it works if I manually execute my bat file. However, when I run the same bat file from the Windows Task Scheduler, I get the error. I have attached part of the log file below. Any help would be appreciated. I apologize if this is something that has been addressed before.
> 2018-03-09 09:22:14.682 Script: lcd X:\
< 2018-03-09 09:22:14.682 Script: Error changing directory to 'X:\'.
< 2018-03-09 09:22:14.682 System Error. Code: 3.
< 2018-03-09 09:22:14.682 The system cannot find the path specified
. 2018-03-09 09:22:14.682 Script: Failed
. 2018-03-09 09:22:14.682 Script: Exit code: 1
. 2018-03-09 09:22:14.682 Closing connection.
I have made sure that in the task properties, I have checked Run Whether User is logged or or not. I have also enabled Run with highest privileges. Finally, I have Configured for Windows 7 which is the OS that I am using. Thank you.
lcd /home/other/Nox
cd X:\
get -delete *
exit
All of it works if I manually execute my bat file. However, when I run the same bat file from the Windows Task Scheduler, I get the error. I have attached part of the log file below. Any help would be appreciated. I apologize if this is something that has been addressed before.
> 2018-03-09 09:22:14.682 Script: lcd X:\
< 2018-03-09 09:22:14.682 Script: Error changing directory to 'X:\'.
< 2018-03-09 09:22:14.682 System Error. Code: 3.
< 2018-03-09 09:22:14.682 The system cannot find the path specified
. 2018-03-09 09:22:14.682 Script: Failed
. 2018-03-09 09:22:14.682 Script: Exit code: 1
. 2018-03-09 09:22:14.682 Closing connection.
I have made sure that in the task properties, I have checked Run Whether User is logged or or not. I have also enabled Run with highest privileges. Finally, I have Configured for Windows 7 which is the OS that I am using. Thank you.