Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Use Automator to filter out every third file?

I have 4,500 images and I'd like to pull every third image and put them in a separate folder. The files are numbered, so I'd like to get 0003, 0006, 0009, ...etc.


Any ideas?


They are bracketed exposures for an HDR time lapse, so they have exposure bias attached in their metadata (+1, 0, -1) but I can't figure out how to sort by that info in Finder, Bridge, or anything else...


Thanks!

iMac, Mac OS X (10.6.8), 27" 3.4GHz Intel Core i7

Posted on Jul 15, 2011 1:09 PM

Reply
Question marked as Best reply

Posted on Jul 15, 2011 1:20 PM

Set up automator with a process to move the first file from the master folder to folder A


Then copy this process three times, changing process 2 to folder B and process 3 to folder C


Once there is no more files it should hang with a error, but regardless your deed is done.



I'll mess with it and see what I come up with. But likely you have more experience than I. 🙂

12 replies
Question marked as Best reply

Jul 15, 2011 1:20 PM in response to seenew

Set up automator with a process to move the first file from the master folder to folder A


Then copy this process three times, changing process 2 to folder B and process 3 to folder C


Once there is no more files it should hang with a error, but regardless your deed is done.



I'll mess with it and see what I come up with. But likely you have more experience than I. 🙂

Jul 15, 2011 2:35 PM in response to seenew

QuickKeys is payware, but I think they let you use it for a bit, I'll see if I can get it to work. 🙂


Edit: Ah, I already demo-ed out on QuickKeys, jesus I hate that. 😟


There was a free version of a program like QuickKeys, can't seem to find it.


Hate paying for something I hardly even use.



Basically QuickKeys can record your screen actions better than Automator or AppleScript.


You have the open Finder window of your files and three folders (a,b,c) and simply keep dragging the first file in the Finder window to each respective folder.


Then stop after the third one. Assign the action to a keyboard command and keep pressing that or the "run" button until all your files are transfered.


Good Luck. 🙂

Jul 15, 2011 3:31 PM in response to ds store

Ok, I found a this KeyBoard and Mouse Recorder


http://www.macupdate.com/app/mac/10932/keyboard-and-mouse-recorder



It has the ability to set 10 loops before you have to click the play button again. (or register it for more loops)


So you would have to be consistant and record a longer sequence perfectly, but once completed you can run that 10 times.


It moves just as slow as a human though and you lose your mouse obviously while it's working.



I've looked at batch renamers too and no go there either, very hard to rename every third file. 😟



Well I gave it a shot. 🙂

Jul 15, 2011 4:27 PM in response to ds store

add the following apple script: paste it into your Automator workflow (utility: run apple script)


it accepts a folder and passes on the first file, regardless of its name



on run {input, parameters}


-- input must be a folder or a list of folders


-- result: the first item in the folder

tell application "Finder"

set myfolder to the the first item of the input

return the first item of the myfolder

end tell

end run


then (in Automator) add (from files and folders) "move Finder items" and select a destination.


Good luck

Leonie

Jul 15, 2011 4:49 PM in response to ds store

You will probably want to sort the items in the folder by some criteria (such as name) to determine what really is "the first file in a folder". My Trim Input Items action doesn't look at what the input items are at all, it just keeps or trims the requested number of items - e.g. "Keep the first 1 items".


It more or less does what leonieDF's script does, but with a few more options and is packaged as a regular Automator action (it is AppleScript based) - the Xcode source files are included if you want to look at it.

Use Automator to filter out every third file?

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