Groups | Search | Server Info | Login | Register


Groups > alt.comp.lang.applescript > #30

Re: Detecting change in folder contents

From Jolly Roger <jollyroger@pobox.com>
Newsgroups alt.comp.lang.applescript
Subject Re: Detecting change in folder contents
Date 2017-04-15 13:36 +0000
Organization People for the Ethical Treatment of Pirates
Message-ID <elelu7F4d8lU2@mid.individual.net> (permalink)
References <1n4hrfj.ltzdtmkkaeiN%adrian@poppyrecords.invalid.invalid>

Show all headers | View raw


On 2017-04-14, Adrian Tuddenham <adrian@poppyrecords.invalid.invalid> wrote:
> OS 8.6
> Applescript 1.3.7
>
> I am trying to write a backup script and want to detect only those
> folders where changes have taken place.  I want to avoid burrowing down
> into thousands of archived folders and files where there have been no
> changes.
>
> Is there a way of detecting, from the folder properties, when the
> contents of a folder have been altered?  e.g. One of the files it
> contains has been modified and Saved with the same name.  The
> Modification Date only seems to change when an item has been added,
> removed or re-named.

I recall you asking about this back in March.

You are correct that the modification date of a folder doesn't change
unless files are added, removed, or renamed in the folder. So you'll
have to look at the modification date of the individual files within the
folder. Here's how to get the modification date of a specified file,
"source":

tell application "Finder" 
        set modDate to the modification date of (file source) 
        log modDate 
end tell 

As I mentioned back in March, there are applications that synchronize
folders in classic Mac OS, like Folder Synchronizer (see the "Previous
Versions" link on this page):

<http://www.softobe.com/folderssynchronizer.html>

-- 
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

Back to alt.comp.lang.applescript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Detecting change in folder contents adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2017-04-14 22:01 +0100
  Re: Detecting change in folder contents Jolly Roger <jollyroger@pobox.com> - 2017-04-14 21:55 +0000
    Re: Detecting change in folder contents adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2017-04-15 08:59 +0100
      Re: Detecting change in folder contents Jolly Roger <jollyroger@pobox.com> - 2017-04-15 13:32 +0000
  Re: Detecting change in folder contents Jolly Roger <jollyroger@pobox.com> - 2017-04-15 13:36 +0000
    Re: Detecting change in folder contents adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2017-04-15 17:52 +0100
      Re: Detecting change in folder contents Jolly Roger <jollyroger@pobox.com> - 2017-04-15 16:58 +0000
        Re: Detecting change in folder contents adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2017-04-15 21:01 +0100
          Re: Detecting change in folder contents Jolly Roger <jollyroger@pobox.com> - 2017-04-15 21:27 +0000

csiph-web