How to detect which files need an update

Andre Garzia soapdog at mac.com
Sat Aug 14 13:32:53 EDT 2004


On Aug 14, 2004, at 1:11 PM, Ton Cardona wrote:

> Although it is easy to detect the date of files in the FTP, I am 
> unable to detect whether the files in the hard disk do need an update 
> by comparing their dates to the dates of those in the FTP.

You can parse the detailed files function for the modification date. 
Also, some FTP servers support MDTM command which gives you the last 
modification date for a given file. You can call it with 
libURLFtpCommand  function. If your server support it, then you can use 
the dateItem stuff in in Rev to make your detection routine, it should 
take you less than ten lines. If your server does not support MDTM 
command, then use a LS command and parse the result for dates, you can 
use MatchText and look for date-like struct or use common chunk 
routines and try to find the date by matching items. This should 
ammount to very little coding too.

If you need further assistance, just ask.

Andre


-- 
Andre Alves Garzia ð 2004 ð BRAZIL
http://studio.soapdog.org



More information about the use-livecode mailing list