Downloading from ftp and comparing filenames

Hi All,

First post! I am slowly learning Applescript (as it is useful for my job).

There is an ftp server that has files on it formatted like so: ProgramName_1.2.3_12_2_12.extension
basically name, version, date uploaded.

I need to download files from the server to a specific folder, and remove the old versions of the same program name.

I only want to do this for files that have newer versions (files get as large as 14gb so I really don’t want to re-download things)

I found a nice script on downloading files from ftp here: http://macscripter.net/viewtopic.php?id=36602 so what I really need help with is the filename comparing, the removing the old versions, and only downloading files that I don’t already have downloaded.

Thanks in advance for any help!

Mike

Model: Mac Pro
Browser: Safari 537.11
Operating System: Mac OS X (10.8)

Hello and welcome to MacScripters.

Do you keep the long filenames, or are those edited to just the filename? I didn’t get that. :slight_smile:

You’ll also have to spell out the form of the date part of the filename for me; if it is mm_dd_yy or dd_mm_yy.

Sorry it took so long to get back,

here is an example filename:

SomeProgram203_WW_2012-12-14.pkg

And I keep the filename the same

Thanks

Hello.

Using your filename as a template, I’ll see what I can do.

I wonder, is there more than one version of the same file available in the listing you download?