I'm connecting to a server that uses a password-protected private key file. I have created a batch file that runs a winscp script, and I use Pageant to store the key so I don't get prompted for the password. This all works fine if I run the batch file from the shell. However, it seems to hang when I run it as a scheduled task, even though I'm using the same user context when I run the scheduled task.
I can't see what's going on with the scheduled task, but my guess is that it's unable to get the private key info from Pageant, and is waiting for a password.
Is there any way to make this work? I really need this to be completely automated and run once per hour to grab files from the remote server. Here is my batch file and script file:
@echo off c: cd \SCP c:\progra~1\winscp3\winscp3 /console /script=C:\SCP\get_files.scp
option batch on option confirm off open scp-connection cd dropbox option transfer binary get *.csv C:\Data\ rm *.csv close exit
Thanks for any assistance you can offer.