When signed-in the remote server, there are 3 folders as follows:
In the <Folder 3>, there are two more folders and six files (three of them are log and the other three are text files). I need to download the ‘txt’ files, which are shown in red color below:
Please note that the number <12345> is dynamic and it changes everyday.
To test with one file, I wrote the script to automatize the downloading of the file as below:
/command "option batch abort" "option confirm off" "open sftp://<user>:<password>@<website.com >/<Folder 3>/<abc_*_txt>" "get c:\<local_filename.txt>" "exit"
Since the number part of the file name changes dynamically everyday, I have used ‘*’.
In Windows 7, I have scheduled a task to run the script automatically, and placed the above script in ‘Add arguments (optional)’ field. The ‘Program/script’ field looks as follows: ‘C:\Users\Downloads\winscp571setup.exe’
At the designated time (7:00 a.m) the Windows7 task scheduler is triggering the task. But the task “appear to” run endlessly and not completing the run even after 2 hours (the file being tested is of 6000 bytes. Other files are very huge).
Please help me with the correct script and the steps I need to follow.