automate and schedule sending file to ftp server

Every day I have to manually  send a file to one ftp server. Is it possible to automate this process. protcol used for file trranser is SFTP. My computer is WindowsXP
dedriAsked:
Who is Participating?
 
AlexPaceCommented:
You could use the Robo-FTP script below to make a Windows Service that uploads the file every day at 9am:
:top
PAUSE /until=09:00
FTPLOGON "sftp.mydomain.com" /user="UserID" /pw="secret" /servertype=SFTP /trust=all
SENDFILE "c:\source\daily_file.xml"
FTPLOGOFF
GOTO top

Open in new window


You'll need to change the connection credentials on the 3rd line and the file name on the 4th line.  If necessary you can change the upload time of day on the 2nd line.  I'd run the script once in the main console window once to make sure it works and then use the Service Installer program under the start menu program for Robo-FTP to make it run as a Windows Service.
0
 
Lavi ShiffmanConsultant Commented:
The easiest way to achive this is to use a scheduled task using the AT command.

Here you can find the AT syntax which can be used to automate scheduled tasks.

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/at.mspx?mfr=true

All you have to do is construct that proper AT command and run it once on your machine.  From that point it will automatically according the parameters you defined.
0
 
dedriAuthor Commented:
I was looking for  working solution that anyone has already implemented
0
 
psychogrCommented:
I use ncftpput wich is provided by http://www.ncftp.com/ncftp/ and is very reliable and easy to use.

The only thing you have to do is to create a simple batch file and schedule it using windows task scheduler.

Read help file here: http://www.ncftp.com/ncftp/doc/ncftpput.html

Sample script line:

 
ncftpput -R ftp://ftp.example.com  -u Username -p Password 'destination folder' 'source folder' -r 5

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.