I am trying to create a .bat file which will create a log file that contains the list of files in a remote unix server. It runs fine when I run it manually through command prompt. But it doesn't work if I run it through 'Task Scheduler'.
The log_maker.bat
file has the following lines of code in it:
PATH=%PATH%;C:\Program Files
(plink.exe -ssh username@IP -pw password -m shell_script_to_list_files.sh)>log_file.txt
Additional info:
C:\Program Files
contains plink.exe
D:\path1
contains the log_maker.bat
file and the shell_script_to_list_files.sh
file.