Hi there!
I am trying to do this:when i add a new item in a folder (for example,in
“Nikos”) somewhere on my desktop,i want the same item to be copied in another
folder named “Nikos” on another external drive.Is there any way to do that
with folder actions and what’s that?
Thanks a lot!
This should do what you want. You need to modify one line to provide the correct path to the folder on the external drive. The script will produce a dialog if something goes wrong during execution. If you don’t want it to do this, remove lines 6 & 7. If there’s a chance that a file/folder with the same name already resides in the folder on the external drive, the script will need to be modified to handle the issue in an appropriate manner.
on adding folder items to this_folder after receiving added_items
repeat with item_ in added_items
tell application "Finder"
try
duplicate item_ to folder "path:to:other folder:" -- <-modify this line
on error e
display dialog e buttons {"OK"} default button 1
end try
end tell
end repeat
end adding folder items to
– Rob