I'm trying to have any files added to a particular file automatically added to another folder. Here is the applescript I've written so far.
on adding folder items to this_folder after receiving these_items
delay 2
tell application "Finder"
set the destination_folder to folder "Volumes:'Macintosh HD':Users:mikekijewski
esktop:'output folder'" as alias
set the destination_directory to POSIX path of the destination_folder
end tell
repeat with i from 1 to number of items in these_items
set this_item to item i of these_items
set the item_info to info for this_item
set the item_path to the quoted form of the POSIX path of this_item
set the destination_path to the quoted form of ¬
(destination_directory & (name of the item_info) & ".zip")
copy this_item to destination_folder
end repeat
end adding folder items to
I've got the folder actions enabled on the input folder, but nothing is copied when adding files to the folder. Any suggestions?
Thanks.
on adding folder items to this_folder after receiving these_items
delay 2
tell application "Finder"
set the destination_folder to folder "Volumes:'Macintosh HD':Users:mikekijewski
set the destination_directory to POSIX path of the destination_folder
end tell
repeat with i from 1 to number of items in these_items
set this_item to item i of these_items
set the item_info to info for this_item
set the item_path to the quoted form of the POSIX path of this_item
set the destination_path to the quoted form of ¬
(destination_directory & (name of the item_info) & ".zip")
copy this_item to destination_folder
end repeat
end adding folder items to
I've got the folder actions enabled on the input folder, but nothing is copied when adding files to the folder. Any suggestions?
Thanks.