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.

I want to copy a set of local files to ftp://124.30.124.230 (it will ask username and password). I want to do this work in 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. Anyone help me with the coding please.

share|improve this question
    
What operating system? –  Paul Dec 2 '11 at 8:44

2 Answers 2

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 and any security etc.

Personally 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 scripts

My Backup and Upload script/bat file:

(note this was for 2 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.
pause
cd backup.%DATESTAMP%
md "$$$$ Documents"
xcopy "c:\documents and settings\all users\documents\$$$$ documents" "$$$$ Documents" /E /C /I /H /Q
@echo in $$$$ Documents Complete.
pause
md "My Documents"
xcopy "c:\documents and settings\$$$$\my documents" "My Documents" /E /C /I /H /Q
@echo $$$$ My Documents Complete.
pause
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.
pause
ftp
open ###.###.###.###
backup
backup
put backup.%DATESTAMP%
quit
@echo upload to FTP backup complete!
pause
exit
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

 
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.