• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 778
  • Last Modified:

Batch file to copy from FTP site

We have a number of remote users on laptops and I want to be able to give them a batch file that will copy 4 files (the content of one folder) from our FTP site to a folder on their laptops. Laptops all run XP Pro and use 3G dialup to access our servers.

Any suggestions of the best way to do this - installing any software is out as the logistics of getting hold of 400 laptops ....
0
mtech
Asked:
mtech
2 Solutions
 
Todd GerbertIT ConsultantCommented:
Put the ftp commands in a text file:

MyUsername
myPassword
hash
bin
lcd c:\test
cd /pub
mget *
quit



Then call FTP with "ftp -i -s:test.txt"
0
 
coolcasualCommented:
do what tgerbert  says... but add the server name while calling the FTP command like below
 "ftp -i -s:test.txt <servername>"
0
 
Praveen DMInfra Team LeadCommented:
save the file as a -  ftp.bat

-----
V@echo off

> %0.ftp echo o mysite.com
>> %0.ftp echo username
>> %0.ftp echo password
>> %0.ftp echo bin
>> %0.ftp echo cd mydir
>> %0.ftp echo prompt
>> %0.ftp echo mget filename.ext
>> %0.ftp echo bye
ftp -s:%0.ftp
-----

Enter the details in above lines and save the file and give a try....
0
 
mtechAuthor Commented:
Thanks guys
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now