Security Basics mailing list archives

Re: Help writing a back up script


From: Cory Foy <Cory.Foy () mobilehwy com>
Date: Mon, 24 Oct 2005 09:51:07 -0400

Hayes, Ian wrote:
From: Juan B [mailto:juanbabi () yahoo com]
I need to back up some data to remote ftp server on
weekly basis.

the local machine is xp. how can I write a script that
logs in to the ftp ,deletes a a file in the ftp server
and uploads the data?

Write a text file that has the FTP commands you want to execute:

ftp somehost
USER myuser
PASS mypass
DELETE oldfile
PUT newfile

Save as ftpscript.txt

Invoke the script like so:
ftp -s:ftpscript.txt

Right. Then put the FTP command in a batch file and use windows scheduler to run that.

Cory


Current thread: