Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to copy a set of local files to (it will ask username and password). I want to do this work on 400 systems.

I have planned to do this work by creating a batch file and while running this batch file, this has to do that work. How can I do it?

share|improve this question
What operating system? – Paul Dec 2 '11 at 8:44
Batch files and plain FTP. So p[robably windows 98 era. – Hennes Feb 8 at 17:49

On Windows you can use

ftp -s:myftpcommands.txt servername

On Unix/Linux you can use

ftp servername <myftpcommands.txt
share|improve this answer

We need more information regarding the systems you are running it on, the connections, any security, etc.

Personally, I think batch files are a great way of doing this. I've the contents of a simple backup one I'll happily share - you could tailor it to your FTP situation rather than the remote disk and folder creation I used.

FTP batch script)

My backup and upload script/bat file:

(Note this was for 2 Windows XP PC's on a mini workgroup with a WAN connection (###.###.###.###) to a backup server, $$$$'s are my local usernames and it was run from the desktop.)

@echo off
for /f "tokens=1-3 delims=:/" %%i in ("%DATE%") do set DATESTAMP=%%i.%%j.%%k
@echo Directory will be made with this name:
@echo backup.%DATESTAMP%
md backup.%DATESTAMP%
@echo Directory made, now proceeding with file copy...
@echo .
@echo please ensure both PC's are not in E-mail or have any documents open.
cd backup.%DATESTAMP%
md "$$$$ Documents"
xcopy "c:\documents and settings\all users\documents\$$$$ documents" "$$$$ Documents" /E /C /I /H /Q
@echo in $$$$ Documents Complete.
md "My Documents"
xcopy "c:\documents and settings\$$$$\my documents" "My Documents" /E /C /I /H /Q
@echo $$$$ My Documents Complete.
md "$$$$ Email"
xcopy "c:\documents and settings\$$$$\Local Settings\Application Data\Microsoft\Outlook" "$$$$ Email" /E /C /I /H /Q
@echo $$$$ Email Complete.
@echo .
@echo Now ready to upload to FTP backup server.
open ###.###.###.###
put backup.%DATESTAMP%
@echo upload to FTP backup complete!
share|improve this answer
Hi Haydn, I am using windows XP and it is a normal connection i.e., No firewall between the systems.. Please provide me the coding. I will test it out.. – user1056221 Dec 5 '11 at 9:05

Your Answer


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.