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

automate download of files located on shared host

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
willie108
Asked:
willie108
  • 3
  • 3
2 Solutions
 
savoneCommented:
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
 
jekautzCommented:
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
 
willie108Author Commented:
Hi. That sounds good. I may use cuteFTP pro as it may be easier for simple minds to understand :-)
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
jekautzCommented:
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
 
willie108Author Commented:
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
 
jekautzCommented:
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
 
willie108Author Commented:
Thanks! I will try it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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