On Jun 13, 2011, at 8:03 AM, Nobumi Iyanaga wrote:
> 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.

______________________________________________________________________

Hey Nobumi,

The level 0 option (default) of the Satimage.osax's 'backup' function simply reports differences, but unfortunately it does not notice folder modification dates.

If you can live without the folder mod dates synced then this could be a starting point.

On the other hand if you can do all the comparisons in Perl and output a file/folder list along with the date that each should be set to it wouldn't be hard to change the dates with Applescript.

It seems to me that Perl can easily call shell tools, so perhaps you could call 'touch' to change the date.

I believe it is also possible to call 'osascript' from within Perl, so that might be another option.

If none of these options seem doable then please post more information about what you want to do such as:

How big a job?

	What sort of folder depth?
	How many files/folders?
	How are you planning to run the job?
	Yada, yada.

--
Best Regards,
Chris