I was wondering if it is possible to have the following:

In my Downloads folder, I have 2 subfolders : IMAGES and VIDEOS. Is it possible to automatically move every image downloaded to the Downloads folder to the IMAGES folder, and if VIDEO files are downloaded in the Downloads folder, it should go into the VIDEOS subfolder?

I thought I could do it with Smart Folders but it does not seems to be working.


You can create two folder actions, one for images:

enter image description here

one for videos:

enter image description here

Both should be setup to receive files from Downloads folder.

The first step filters images and videos files.

The second step moves those files in the appropriate folder.

Be sure that folder action is attached to your Downloads directory (right click on directory, Services\Folder Actions Setup...).

To let Automator wait for the download to complete, you can add a Run AppleScript step, before the Move Finder Items step, similar to this:

on run {input, parameters}
    if input is {} then
        return {}
    end if

        delay 1
        set {size:fileSize, busy status:Busy} to (info for (input as alias))
        if not Busy and (fileSize is greater than 0) then return input
    end repeat
end run

enter image description here

  • The thing is that during the file download, it moves the temporary download file to the folder, so once the download is over, it makes an error. Is there anything to make it wait until the download is over? – larin555 Nov 16 '12 at 14:37
  • I updated the answer with something that should work. – Riccardo Marotti Nov 16 '12 at 15:43
  • It does not work. It downloads the file in the DOWNLOAD folder, but nothing happens after that. The file is not moving to the MUSIC folder – larin555 Nov 16 '12 at 16:07
  • This is strange. The added script waits for the file to be released, then it passes it to the Move Finder Items step. I tested it on Mac OSX Lion. What version have you? – Riccardo Marotti Nov 16 '12 at 16:32
  • I have Mac OSX Lion too. Can you make a screen shot of all the window once the automator file is all set please? Maybe I'm doing something wrong...Thanks a lot – larin555 Nov 16 '12 at 16:39

Fill in the movieFiles property with the name extensions of the movies you will be dropping. Save the script in your folder actions folder and attach the folder action to your target folder

property movieFiles : {"mov", "m4v"}

on adding folder items to theFolder after receiving theFiles
    repeat with aFile in theFiles
        tell application "System Events"
            if name extension of aFile is in movieFiles then
                move aFile to (theFolder & "VIDEOS" as text)
                move aFile to (theFolder & "IMAGES" as text)
            end if
        end tell
    end repeat
end adding folder items to

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .