Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sammy.d

macrumors regular
Original poster
Jun 18, 2010
109
0
I am trying to create an automator service to take the selected folders in Finder and search each of them for movie files, move those movie files to a certain directory and then move the original folder to trash. However I have no experience and keep getting stuck!

Up the top of the automator window I have selected this:
Screen Shot 2014-06-08 at 5.18.53 pm.png

I then thought the best thing to do would be to use the "Get Folder Contents" action and run some sort of bash script on each file.

But what would I put in the script? I don't know how to write bash scripts. I was thinking something along the lines of:


for each directory
for each file in the directory
if the file is a movie
move the file to this directory "path"​
move the parent directory to trash


I don't know if I should select "Pass input as arguments" or "as stdin". Either way I don't know how to work with them.

Can anyone give me a bit of help with this script?

Cheers!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.