Batch file to copy from FTP site

Posted on 2009-02-13
Last Modified: 2012-05-06
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 ....
Question by:mtech
    LVL 33

    Accepted Solution

    Put the ftp commands in a text file:

    lcd c:\test
    cd /pub
    mget *

    Then call FTP with "ftp -i -s:test.txt"

    Assisted Solution

    do what tgerbert  says... but add the server name while calling the FTP command like below
     "ftp -i -s:test.txt <servername>"
    LVL 13

    Expert Comment

    save the file as a -  ftp.bat

    V@echo off

    > %0.ftp echo o
    >> %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....
    LVL 1

    Author Closing Comment

    Thanks guys

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
    I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now