Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I have 5 servers, and each server has the exact same file structure, is there a ftp program that can replicate the same operation on all the servers?

e.g.:

/wwwroot/site1/

Now if I want to copy a file logo.jpg to the root of the folder:

/wwwroot/site1/logo.jpg

Is there a ftp program (maybe filezilla?) that I can setup so that I just copy the file over and then it performs the same operation on the other servers automatically?

share|improve this question
    
What OS do you use? This is easy to script on *nix –  terdon Feb 21 '13 at 14:54
1  
Not particularly difficult to script on windows either, but knowing the OS is necessary for the proper answer. –  EBGreen Feb 21 '13 at 14:57
    
If you're using Windows, DFS should work swimmingly. –  Tanner Feb 21 '13 at 15:03
    
Similar or duplicate of superuser.com/questions/455277/… or (Windows specific) serverfault.com/questions/292785/… –  mr.spuratic Feb 21 '13 at 17:52
    
@terdon windows 7 –  user1361315 Feb 21 '13 at 20:18
show 2 more comments

1 Answer

user1361315, if you're using Windows 7 then you can use the built in FTP.exe client, which supports:

-s:filename.txt

So just put lines like:

open ftp.siteone.com
ftpuser
myPassW0rd
cd /wwwroot/site1/
bin
put logo.jpg
quit

In filename.txt and use:

ftp -s:filename.txt

You could easily create a batch file with some stub files which used:

copy /A siteone.txt+newcommand.txt filename.txt
 copy /A sitetwo.txt+newcommand.txt filename.txt

To join a "header" file for each site (different host, password, etc) with a common "newcommand" that did the same work for each of them and then runs FTP 5 times.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.