Link to home
Start Free TrialLog in
Avatar of ajalboush
ajalboush

asked on

FTP script for automatic files copy?

Hi,
I want to get files from a server and on this server there is an FTP server defined. i need a script that allow me to get files from this sever in a certin folder and put it on  another server in a certain folder. the files are continuously modified, the script must get the files from there at every change occur. so there must be a way to automate the process.

Avatar of Shift-3
Shift-3
Flag of United States of America image

You can write a batch script to automate FTP sessions.
http://support.microsoft.com/kb/96269

From what you describe it sounds like you need one script like this to do the download from the first server:
lcd c:\localfolder
open server1
username
password
cd /usr/foldername
binary
prompt n
mget *.*
bye

And a second one to upload to the second server:
lcd c:\localfolder
open server2
username
password
cd /usr/otherfoldername
binary
prompt n
mput *.*
bye

Scheduling these two scripts to run at short intervals in Task Manager should accomplish what you want.
ASKER CERTIFIED SOLUTION
Avatar of Shift-3
Shift-3
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

I think the answer was provided. Why the points can not be given based on your judgment?

Thanks