Drop folder action to sort and move files

I have a messy desktop. I have been told applescript is kowl 🙂

Can an apple script be made as a folder action to identify and sort files dropped into the folder then have them moved to another folder. ie identify the file is a jpeg and move to pictures folder etc etc.

Posted on Oct 17, 2005 9:25 PM

Reply
2 replies

Oct 17, 2005 9:47 PM in response to Marscus

Yes. It's entirely possible (and trivial) to do this via AppleScript. Something like this should get you started:

property jpegFolder : "Path:to:JPEGs:" -- where JPEGs should be moved to



on adding folder items to this_folder after receiving these_items

repeat with this_item in these_items

set the item_info to the info for this_item

if the file type of item_info is "JPEG" then

tell application "Finder" to move this_item to folder jpegFolder

end if

end repeat

end adding folder items to

Hopefully you can see how to change it to filter other file types.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Drop folder action to sort and move files

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.