?
Solved

automate download of files located on shared host

Posted on 2012-08-27
7
Medium Priority
?
985 Views
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.
0
Comment
Question by:willie108
  • 3
  • 3
7 Comments
 
LVL 23

Assisted Solution

by:savone
savone earned 800 total points
ID: 38339230
There is a bunch of free software out there that can automate ftp transactions.

I recommend WinSCP. Here is a link to download it:
http://winscp.net/eng/download.php

And here is a link telling you how to do exactly what your asking for:
http://winscp.net/eng/docs/guide_automation
0
 
LVL 4

Accepted Solution

by:
jekautz earned 1200 total points
ID: 38339290
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#
username
password
[place all your ftp commands here]
quit
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.
0
 

Author Comment

by:willie108
ID: 38339294
Hi. That sounds good. I may use cuteFTP pro as it may be easier for simple minds to understand :-)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:jekautz
ID: 38339309
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)
0
 

Author Comment

by:willie108
ID: 38339317
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?
0
 
LVL 4

Expert Comment

by:jekautz
ID: 38339371
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.

http://www.dostips.com/?t=Batch.FtpBatchDownloadOnlyNewFiles

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

Author Comment

by:willie108
ID: 38339465
Thanks! I will try it.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Cloud file services can fill many different roles for your business. Often, the use of cloud file services begins with employees using consumer products, like Dropbox, to share files with customers and each other. While sync-and-share can be an effe…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), 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…
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

839 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