Tente:
on adding folder items to this_folder after receiving added_items
tell application "System Events"
repeat with aFile in added_items
if the name extension of aFile is "mp3" then
move aFile to "/Users/davidcuster/Music"
else if the name extension of aFile is "mkv" then
move aFile to "/Users/davidcuster/Movies"
end if
end repeat
end tell
end adding folder items to
Além disso:
"/ Users / davidcuster / Music" = (caminho para a pasta de músicas)
"/ Users / davidcuster / Movies" = (caminho para a pasta de filmes)
on adding folder items to this_folder after receiving added_items
tell application "System Events"
repeat with aFile in added_items
if the name extension of aFile is "mp3" then
move aFile to path to music folder
else if the name extension of aFile is "mkv" then
move aFile to path to movies folder
end if
end repeat
end tell
end adding folder items to