Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. 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 for a username and password). I want to do this work on 400 systems so I have planned to do this work by creating a batch file to do that work. Can anybody help me out with the coding please.

Update

I tried the below script, but when I ran it I got an error.

lftp -e 'mirror -r C:\Documents and Settings\voyager\Desktop\Ramkrishna\Daily Report /MINDSCAPE/Ramkrishnan/ftp' -u ablftp,(password entered) 124.30.124.230
pause

My result was this:

C:\Documents and Settings\voyager\Desktop>lftp -e 'mirror -r 'lftp' is not recognized as an internal or external command, operable program or batch file.

C:\Documents and Settings\voyager\Desktop>C:\Documents and Settings\voyager\Desk top\Ramkrishna\Daily Report /MINDSCAPE/Ramkrishnan/ftp' -u ablftp,(*) 124.30.124.230 'C:\Documents' is not recognized as an internal or external command, operable program or batch file.
share|improve this question
    
Have you done any trial to help you improve it? –  Khaled Dec 5 '11 at 9:33
add comment

1 Answer

my first try would be lftp, using mirror -r command.

so you could basicaly create batch file with just

lftp -e 'mirror -r /local/path /path/on/ftp' -u user,pass 124.30.124.230

and run this on all hosts

share|improve this answer
    
Hi Fox,,Thanks for your reply. I have used your codes like this lftp -e 'mirror -r C:\Documents and Settings\voyager\Desktop\Ramkrishna\Daily Report /MINDSCAPE/Ramkrishnan/ftp' -u ablftp,(password entered) 124.30.124.230 pause –  Phillips Dec 6 '11 at 4:29
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.