Posted: 2011-02-10 15:15
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:
"\\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:email@example.com
# Specify SFTP connection
# Change remote directory
# Force binary mode transfer
option transfer binary
# List files in remote directory example\
# Download file to the local directory
get *.* -delete "\\computername\drivename\targetfolder\"
# Exit WinSCP
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.
Posted: 2011-02-10 16:07
More info. I produced a log and these entries were there:
The server's host key was not found in the cache. You have no guarantee that the server is the computer you think it is.
The server's rsa2 key fingerprint is:
If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.
Continue connecting and add host key to the cache? ()
Attempt to close connection due to fatal exception:
Host key wasn't verified!
Location: Prague, Czechia
Please read documentation:
You can post new topics in this forum
And it's free!