Discussion Locked

Automation of file transfer

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I need a simple solution to a problem...
I need to upload a file from my NT server to an ftp site every night on a regular five day schedule. I would like this transfer to be automated. Currently, I manually upload using CuteFTP. Any ideas???

5 replies

by joseph moore

You can use the built in FTP client in WinNT.
Specify the -s switch, and provide a log file with the FTP info.
For example, to FTP a file to 10.1.1.1, your FTP line would look like:

FTP -s:c:\temp\ftpfile.txt

This is assuming you have a file called "ftpfile.txt" in c:\temp. Now, this ftpfile.txt contains the IP address of the remote FTP server, the user name, password, and the file info you are sending to.
It would look something like this:

open 10.1.1.1
USERNAME
password
asciiprompt
lcd c:/temp
put sendfile.txt
bye

This file says to connect to 10.1.1.1 with USERNAME password, go to the local directory (on the client) c:\temp, and send the file "sendfile.txt" to the FTP server. When done, disconnect.

hope this helps

by r. a. caluste

Answer 1 is correct. To schedule the ftp process, use the at command.

doftp.bat
FTP -s:c:\temp\ftpfile.txt

syntax:

at 20:00 /every:M,T,W,Th,F "doftp.bat"

enter this at the command line.

This discussion is closed to new replies.