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.

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

2 Answers

On Windows you can use

ftp -s:myftpcommands.txt servername

On Unix/Linux you can use

ftp servername <myftpcommands.txt
link|improve this answer
feedback

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
link|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
feedback

Your Answer

 
or
required, but never shown

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