|
Answer» Hi ya all,
Im need to create a batch file which copies a range of files from a directory on server1 onto server2 then delete the files copied on server1.
Any IDEAS?i will assume that the two SERVERS are on different networks
create a batch file called "step1.bat" and PUT this line in it
" ftp -s: script1.txt del 'file(s)'
"
then create a text file called script1.txt and put these lines in it
" open 'ip address of server2' 'username' 'password' bin mput 'file(s)'
"
additional notes: you have to input all values LISTED in single quotes. You might need an ftp client that supports "passive" mode if you are behind certain firewalls or if server2 does not accept "active" connections. If the servers are in a cluster or networked together, you can simply create a shared folder to move files between the servers. Sorry my fault. I should have added more information. The second server isn't on anothe network. As this is a tempory set up I have set it as Peer to Peer.
The location of the files on server1 is: I:\Archive The destination I want to put the files on Server2 is D:\Archive I have mapped a drive on Server2 to Server1 (I$ 192.168.2.3 E:)
I would use ftp BUT I am looking at over 500,000 files. I cannot choose which files I want to copy. That is why I need to know what files GET copied so I can delete. Any Ideas?
|