Topic "Schedule Script Help"

Author Message
[View user's profile]

Joined: 2013-11-28
Posts: 1
Location: Belfast
Hi All,
I nearly have this cracked.
I'm trying to connect to an SFTP location & PUT a file & create a log.
Then schedule the task using the AT command.
I have tested from the C:\ command prompt & all works fine.

eg C:\> /script=FileFTP.txt >FileFTP.log enter...
The script as follows :-

Option batch abort
Option confirm off
Open sftp://Myusername:Password9@151.234.567.89:22
Put File1.dat

I put the same command - /script=FileFTP.txt >FileFTP.log - in a .CMD file & scheduled it using AT time /e:m,t,w,th,f FileFTP.cmd

I also tried scheduling the command in double quotes - AT 12:00 "c:\'Path'\ /script=FileFTP.txt >FileFTP.log"

The command line version works & creates an output file - the scheduled versions do nothing.
Hopefully I'm missing something simple...
Thanks in advance for any help.
Kind Regards

I have progressed a bit...

I got a log file today when I ATd, (scheduled), the cmd file.
How do I accept this ssh-rsa fingerprint in a script ?

batch abort
confirm off
Searching for host...
Connecting to host...
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:
ssh-rsa 1024 01:12:2e:76:19:1b:8t:7c:12:30:09:27:f3:93:03:37
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?
(Y)es, (N)o, C(a)ncel, (C)opy Key: Cancel
Host key wasn't verified!
Host key fingerprint is ssh-rsa 1024 0b:18:2e:75:18:1f:8f:6c:02:50:09:27:f3:93:03:37.

Authentication failed.
I'm answering my own questions here.... Patience is a virtue....
I got it sorted - just had to add the remote FTP server ssh-rsa fingerprint to the open line.
ie. Open sftp://Myusername:Password9@151.234.567.89:22 -host= "ssh-rsa 1024 0b:18:2e:75 etc etc etc etc etc.

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
Location: Prague, Czechia
Just to back up your findings:
Martin Prikryl

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License