I have two internal HDs on my G5 using OS 10.2.8. Where can I find a script to copy image files that are newly created or altered on my boot drive to my backup, second internal HD? Or perhaps a good tutorial for a total newbie? TIA
A folder action can easily handle the newly added files. Here’s the basic code.
on adding folder items to this_folder after receiving added_items
repeat with item_ in added_items
try
tell application "Finder" to ¬
duplicate item_ to folder "path:to:target folder:"
on error errMsg
-- do something when an error occurs (if desired)
end try
end repeat
end adding folder items to
Folder actions do not operate on modified files. It is likely possible to write a stay open script (application) that can handle this but I have no sample code to offer.
– Rob
Rob–
Thanks so much.
Paul