Running script from scheduled task
I've read a number of posts on this subject and read the documentation, but I still don't understand what I have to do to run a script that downloads files from a scheduled task. I understand that running this way means WinSCp is running under a different account and configuration, but I'm not familiar with .ini files, changing configuration storage locations, or making registry changes. Can someone please refer me to a more detailed post, or give me an example, that explains in step by step fashion what I have to do to get WinSCP to run from a scheduled task? I'm certain this can be done easily but I just can't get it to work. Here's the script that works when I'm logged on:
DOS batch file command to launch WinSCP contains following:
WinSCPscript.txt contains following:
I'd really appreciate some help here as I've been trying to get this to work for a couple of weeks with no progress.
Thanks[/code]
DOS batch file command to launch WinSCP contains following:
"\\computername\drivename\WinSCPfolder\WinSCP.exe" /console /script="\\computername\drivename\WinSCPfolder\WinSCPscript.txt"
WinSCPscript.txt contains following:
# Automatically answer all prompts negatively not to stall # the script on errors option batch on # Disable overwrite confirmations that conflict with the previous option confirm off # Connect using a userid, password and host # open user:password@example.com # Specify SFTP connection open myuserid:mypassword@sftp.mycompany.com # Change remote directory cd /home/sourcefolder # Force binary mode transfer option transfer binary # List files in remote directory example\ #ls # Download file to the local directory get *.* -delete "\\computername\drivename\targetfolder\" # Disconnect close # Exit WinSCP exit
I'd really appreciate some help here as I've been trying to get this to work for a couple of weeks with no progress.
Thanks[/code]