Jump to content

Automatic File Updating Script

Recommended Posts

Hello Everyone. I'm not exactly sure how to search for what I want so I was wondering if someone might be able to guide me in the right direction. I don't know much about programming (a little Java is the extent), but I will gladly read and learn new code once I figure out which one I need.

The idea: I do a lot of installations for customers (some still on dial-up) of Anti-Virus programs as well as other applications like iTunes and such. It's very tedious to have to run out to the websites and check for the latest copy of every single file I have on my flash-drive before I run off and install them. It's also annoying to have to save these files to your drive only to have a newer installation package come out the next day. This is especially a problem for programs like iTunes (because for some reason Apple feels you should have to download the entire installation package for iTunes and QuickTime everytime they release a new update. I still don't understand why they can't just do an update like most every other program that updates only the files changed). In any case, I would like some sort of program/script that is fully customizable such that I can put any given URL into and it will compare the latest file date/version on the site with the one on my HDD. Assuming the file on the site is newer, it will then delete my old file and automatically download the newer one. Once the update has been completed it will produce a log file saying the update was completed or unnecessary.

With something like this I can keep all my installations completely up to date without having to do anything. I'll schedule the program to run in the middle of the night and when I awake for another day I'll have all the latest updates. If anybody has any idea how to do this I would greatly appreciate some help. I know it's possible because websites like MajorGeeks.com always have the latest updates of every file on their site.


Link to comment
Share on other sites

This may not be as easy as you think for some applications. For example, a program with a download URL of something like http://somewebsite.com/setup.exe would be fine, but it the file was program_vX.Y.exe, then the URL will be different for each release.

The way I would go about writing something like this would be to write an application to read the news (http or rss) from sites like MajorGeeks, FileForum, etc. and match names from the new/updated files to those already on your hard drive. I would store configuration (news feeds to read, names of files interested in downloading, etc) in an XML file, and use Regular Expressions to actually do the matching.

Its been a really long time since I had to use Java, but Regular Expressiong and HTTP/FTP downloads should be fairly easy, regardless of the language you use.

Link to comment
Share on other sites

There's already a program for this called Appupdater. I haven't tested it out personally but from what I've heard it does the job.

If this doesn't work for you as intended, then I could post the script I myself have been working on for automatic app updates.

Link to comment
Share on other sites

Hey Colonel, Thanks for the reply. I already knew what you were saying would be a problem. I was getting my ideas using the free version of AVG update, and the file names are structured basically like you mentioned. It would be easy if every filename was the same. I'll look into what you've told me about. Thanks.

Dexter - Thanks. I've been trying to find one but I didn't know how to search google for it. I'll give that App and try and post back as soon as I've thoroughly tested it.

(When downloading AppUpdate, a user's comment pointed me to FileHippo's "Update Checker" which is very cool. It only works for programs you've installed on your computer (rather than installation packages) but it's a 100k exe with no installations so it's very handy).

After testing AppUpdate, my conclusion is that it's handy but not so much as "Update Checker". I don't see a way to do it straight from a file list. It says there is a way to customize it but I haven't seen it yet - Probably my lack of experience with these type things. There's also no way to tell how fast a download is running or if it's even running at all. It's strictly command line so far. So I guess this isn't exactly what I'm looking for.

I wish there was a way to use wildcards when downloading on a webpage like for iTunesv_7.3.exe you could simply put http://...iTunes*.exe, that way no matter what version it was it would download it (assuming the site manager doesn't leave all the install packages in the same folder on his site).

Edited by Sjl1986
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...