Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Detecting change in folder contents

4 views
Skip to first unread message

Adrian Tuddenham

unread,
Apr 14, 2017, 5:02:41 PM4/14/17
to
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.

--
~ Adrian Tuddenham ~
(Remove the ".invalid"s and add ".co.uk" to reply)
www.poppyrecords.co.uk

Jolly Roger

unread,
Apr 14, 2017, 5:56:02 PM4/14/17
to
On 2017-04-14, Adrian Tuddenham <adr...@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.

Why use AppleScript for this? There are command-line tools like rsync
that are designed for this purpose and excel at it.

--
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

Adrian Tuddenham

unread,
Apr 15, 2017, 4:01:38 AM4/15/17
to
Jolly Roger <jolly...@pobox.com> wrote:

> On 2017-04-14, Adrian Tuddenham <adr...@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.
>
> Why use AppleScript for this? There are command-line tools like rsync
> that are designed for this purpose and excel at it.

How do I use command-line in OS 8.6?

Jolly Roger

unread,
Apr 15, 2017, 9:32:49 AM4/15/17
to
On 2017-04-15, Adrian Tuddenham <adr...@poppyrecords.invalid.invalid> wrote:
> Jolly Roger <jolly...@pobox.com> wrote:
>
>> On 2017-04-14, Adrian Tuddenham <adr...@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.
>>
>> Why use AppleScript for this? There are command-line tools like rsync
>> that are designed for this purpose and excel at it.
>
> How do I use command-line in OS 8.6?

I missed that detail. Sorry.

Jolly Roger

unread,
Apr 15, 2017, 9:36:09 AM4/15/17
to
On 2017-04-14, Adrian Tuddenham <adr...@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>

Adrian Tuddenham

unread,
Apr 15, 2017, 12:54:26 PM4/15/17
to
Jolly Roger <jolly...@pobox.com> wrote:

>
> 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>

Thank you, I remember your reply, but that software is only available
for OSX. There were a few commercial backup systems for OS8, but most
of them have limitations that make them unsuitable for large numbers of
files.

I can delve into every folder for the Modification Dates of the files,
but it is a very slow business which would be unsuitable for a regular
daily backup. I was hoping to identify folders that had not changed
(most of them) and skip over them.

Jolly Roger

unread,
Apr 15, 2017, 12:58:49 PM4/15/17
to
On 2017-04-15, Adrian Tuddenham <adr...@poppyrecords.invalid.invalid> wrote:
> Jolly Roger <jolly...@pobox.com> wrote:
>
>> 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>
>
> Thank you, I remember your reply, but that software is only available
> for OSX.

My goodness. Please pay attention. As I stated when I first mentioned
it, and again above, there is a version that will run on classic Mac OS,
which you can find by clicking the "Previous Versions" link on the above
web page.

> I can delve into every folder for the Modification Dates of the files,
> but it is a very slow business which would be unsuitable for a regular
> daily backup. I was hoping to identify folders that had not changed
> (most of them) and skip over them.

Using AppleScript is an inefficient way to do what you want to do.
That's why I suggested you use an application that is designed to do it
more quickly.

Adrian Tuddenham

unread,
Apr 15, 2017, 4:03:19 PM4/15/17
to
Jolly Roger <jolly...@pobox.com> wrote:

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

There was a problem (which I had forgotten about): their website doesn't
work on any OS 8.6-compatible browser. That was why I hadn't followed
it up.

I have now used an OSX machine to download it and have copied it across
to the OS 8.6 machine. Reading through the manual, it does seem as
though it will do what I want, so thank you for letting me know about
it.

(Trying to write an Applescript to do the job has proved to be an
interesting learning exercise, even if the result never gets used.)

Jolly Roger

unread,
Apr 15, 2017, 5:27:35 PM4/15/17
to
Adrian Tuddenham <adr...@poppyrecords.invalid.invalid> wrote:
> Jolly Roger <jolly...@pobox.com> wrote:
>
>> http://www.softobe.com/folderssynchronizer.html
>
> There was a problem (which I had forgotten about): their website doesn't
> work on any OS 8.6-compatible browser. That was why I hadn't followed
> it up.

Ah, okay. I was wondering! No harm, no foul. : )

> I have now used an OSX machine to download it and have copied it across
> to the OS 8.6 machine. Reading through the manual, it does seem as
> though it will do what I want, so thank you for letting me know about
> it.

Cool. Hope it does!

> (Trying to write an Applescript to do the job has proved to be an
> interesting learning exercise, even if the result never gets used.)

Who knows; maybe parts of it will become useful for other things later on.
0 new messages