Jag skulle vilja lägga en Folder Action till min Download-katalog som gör
att alla bilder hamnar i en mapp som heter Bilder, alla mp3 i en mapp som
heter MP3 och alla PDF i en mapp som heter PDF osv. osv.
Men hur skriver jag detta, försökte med ett script jag hittade:
on adding folder items to this_folder after receiving added_items
tell application "Finder"
repeat with aFile in added_items
if the name of aFile contains {".jpg"} ¬
or the name of aFile contains {".gif"} ¬
or the name of aFile contains {".png"} ¬
or the name of aFile contains {".pict"} ¬
or the name of aFile contains {".tiff"} ¬
or the name of aFile contains {".gif"} ¬
or the name of aFile contains {".psd"} ¬
or the name of aFile contains {".bmp"} then
tell application "Finder"
try
move aFile to folder "Mac_name:Users:User_name:Pictures:unfiled:"
on error err
display dialog err
end try
end tell
display dialog ¬
"Image files have been moved to the Unfiled folder in your Pictures folder."
end if
end repeat
end tell
end adding folder items to
Men lyckades inte få det att funka.. nån som har lust att hjälpa mig?