MACSCRPT Archives

June 2011

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Nobumi Iyanaga <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Mon, 13 Jun 2011 22:00:41 +0900
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
Hello Mark,

Thank you for your quick reply.

On Jun 13, 2011, at 9:27 PM, Mark Lively wrote:

> On Jun 13, 2011, at 8:03 AM, Nobumi Iyanaga wrote:
> 
>> Hello,
>> 
>> I need to write a script which compares two folders recursively, finds files and folders of the same name at the same location in the folder structure, and if they are of the same size, set the modification date of files/folders of the source folder to files/folders of the destination folder.
>> 
>> AppleScript is probably not the fastest way to do that; and I almost don't know how to go through folders with AppleScript; but the only scripting languages that I know of (a little) are AppleScript and Perl -- and it seems Perl has no command to set the modification date of a file/folder.
>> 
>> Could some kind soul help me to write such a script?
>> 
>> Thank you very much in advance.
>> 
>> Best regard,
>> 
>> Nobumi Iyanaga
>> Tokyo,
>> Japan
> 
> If you have the satimage scripting addition installed it is simply.
> 
> backup folder1 onto folder2 level 1

Thank you very much. But if I understand well satimage scripting addition dictionary, this would synchronize the two folders. This is not exactly what I need to do.

I used "rsync -aHEv" to synchronize two folders, but for some reason that I don't understand, it creates a mess of last modified date attribute in some old files/folders (it puts the modified date to "now", or something). I have an older backup of the same folder -- so I need to set again the old modified date to the files of the same name and same size in the newer folder...

Thank you for any further thought.

Best regard,

Nobumi Iyanaga
Tokyo,
Japan

ATOM RSS1 RSS2