- Joined
- Aug 25, 2009
- Messages
- 7
- Reaction score
- 0
- Points
- 1
Hi to all,
I wrote the following script to be used as a folder action. What I want is that, whenever a new .avi or .mov file is added to the folder where i attach it, that file is move to my movies folder.
It is not working thought. Any help?
The code:
I wrote the following script to be used as a folder action. What I want is that, whenever a new .avi or .mov file is added to the folder where i attach it, that file is move to my movies folder.
It is not working thought. Any help?
The code:
Code:
property extension_list : {"avi", "mov"}
on adding folder items to this_folder after receiving these_items
repeat with i from 1 to number of items in these_items
set this_item to item i of these_items
tell application "Finder"
if (the name extension of this_item is in the extension_list) then
tell application "Finder"
move this_item to "/Users/gu/Movies"
end tell
end if
end tell
end repeat
end adding folder items to