Determining the modified files in nested folders


I have created a subroutine that archives the last X copies of a file or a folder (and it’s content) in a specified destination folder.

In order to backup only a modified folder I need to now if any of the files of any of the nested folders have been modified. Since the folder’s modification date only accounts for the modifications made in the first nested level, is there a way to now if any of the nested files have been modified ??

Seems like a great place to use the “whose” statement there.

  set modList to every file of folder theFolder whose modified date is greater than modified date of theFolder

Maybe I’m misunderstanding?


Hello tingham,

After thinking more of this script, I realize that it is impossible to compare modification date of file nested inside folders. As an example, the modification date of a file located at the third level is not reflected in the modification date of the first level folder, thus making it impossible to compare the actual modification date of the first level folder with the modification date of a previous backup of this folder.

This script will only be possible with files or with folders that contains the files at their first level. Being so, my script is done. Thanks again for trying to help … :^) :^):^):^):^):^):^):^):^):^):^):^):^):^)