I have created a script which scans a folder and all of its nested subfolders for Quark docs with new modifications dates. It is running on a folder with hundreds of nested folders and it seems to work fine but I was wondering if there was a quicker way to check a folder and its subfolders for new/modified docs.
Is there a way (perhaps apple events) to identify files added to a folder/subfolder without looking through each folder but rather checking the first outer folder for changes?
Here is the basic part of the script that finds the new/repl quark docs (which I put toghether from a looking at a variety of examples here.)
on moveFilesFrom(thisFolder)
tell application "Finder"
set date_stamp to (current date) - (8.0 * hours)
set filesToMove to every file of thisFolder
repeat with aFIle in filesToMove
set file_info to file type of (info for (aFIle as alias))
if file_info = "xprj" or file_info = "xdoc" then
set mod_date to modification date of (info for (aFIle as alias))
if mod_date is greater than date_stamp then
duplicate aFIle to folder "testfolder" of folder "Local desktop" of disk "scratch" with replacing
my QuarkPDF()
end if
end if
end repeat
set subFolders to (every folder of thisFolder)
repeat with aFolder in subFolders
my moveFilesFrom(aFolder)
end repeat
end tell
end moveFilesFrom
Thanks