automate download of files located on shared host

Posted on 2012-08-27
Last Modified: 2012-08-27
I am running Windows 7 on my home computer and the shared server I believe is Linux. The shared server has cpanel. I have a folder where files are collected every day and then I manually download those files each day. Anyone know of a way that I can automate the download so that I don't have to do it manually and so that it will be done at the exact same time every day? This is on a shared host. I thought of setting up a php script that sends them by email but this is not the best solution. The files are from 20 to 60 mb and there are 6 per day. The other thing I did not want to do is run a server on my home computer like WAMP or XAMP.

Thanks for any ideas.
Question by:willie108
    LVL 23

    Assisted Solution

    There is a bunch of free software out there that can automate ftp transactions.

    I recommend WinSCP. Here is a link to download it:

    And here is a link telling you how to do exactly what your asking for:
    LVL 4

    Accepted Solution

    I have automated FTP downloads before without any additional software.  The Windows FTP command can be automated.

    Place all your FTP commands into a text file called ftpscript.txt.
    open servername port#
    [place all your ftp commands here]
    Then call the text file with a batch file like this:
    ftp -s:ftpscript.txt
    Now all you need to do is automate the batch file.

    For accuracy, I like to manually log into the FTP server and type the commands I need to get the job done.  Record the commands.  Then place them into the FTP script.

    Author Comment

    Hi. That sounds good. I may use cuteFTP pro as it may be easier for simple minds to understand :-)
    LVL 4

    Expert Comment

    FTP commands are very simple.  After you enter your username and password, you can then change directory and download.  Like this:

    lcd c:\users\myprofile\desktop (this changes your download directory to your desktop)
    cd \pub (this changes your FTP directory to Pub)
    get myfile1
    get myfile2 (these files will downlad to your desktop)
    ... or ...
    mget myfile* (this will download all files that match myfile)

    Author Comment

    what would be an example of ftp commands that would either synchronize a remote folder with a local folder or to download the last 6 files from the remote host to the local folder?
    LVL 4

    Expert Comment

    FTP cannot do that by itself.  You must output a directorly listing to a file, parse it, then download those files.

    Here is a script that will only download files that you have not downloaded.  I have not used this script myself but I looked it over and it seems solid enough.

    You should only have to modify lines 4, 55-57, 60-61 to suite your needs.

    Author Comment

    Thanks! I will try it.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    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.

    It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
    Online collaboration is quickly becoming embedded in the workplace, and its benefits are tangible. See what the current landscape looks like and what the future holds for collaboration tools and the future of work.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    760 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

    7 Experts available now in Live!

    Get 1:1 Help Now