Jump to content



Photo

Mac/Automator - How to ignore subfolders in search?

mac automator finder

  • Please log in to reply
14 replies to this topic

#1 emmx

emmx

    Awesome

  • Joined: 20-February 05
  • Location: Michigan

Posted 13 January 2013 - 20:10

I'd like to setup a workflow to organize my Mac's Downloads folder. I'm starting with moving all the images to the Pictures folder, but I don't want to move the images that are in subfolders, because I download many things that include images with them, and I don't want those images being separated from the folder they belong in.

For example, if I have downloaded a Wordpress theme, I want those images to stay in their theme folder instead of being moved to "Pictures".

So how do I make finder (within automator) only select the immediate images in the downloads folder and ignore subfolders?

I realize it would be easy for me to sort by "kind" and move them all manually. I'm just fooling around with Automator, and maybe I'll set this as a future automatic, periodic task.


#2 einsteinbqat

einsteinbqat

    Neowinian

  • Joined: 16-May 02

Posted 13 January 2013 - 20:45

I'd like to setup a workflow to organize my Mac's Downloads folder. I'm starting with moving all the images to the Pictures folder, but I don't want to move the images that are in subfolders, because I download many things that include images with them, and I don't want those images being separated from the folder they belong in.

For example, if I have downloaded a Wordpress theme, I want those images to stay in their theme folder instead of being moved to "Pictures".

So how do I make finder (within automator) only select the immediate images in the downloads folder and ignore subfolders?

I realize it would be easy for me to sort by "kind" and move them all manually. I'm just fooling around with Automator, and maybe I'll set this as a future automatic, periodic task.


Try this. This seems to be working.

You run the app, and select a folder. The app looks for jpg in that folder only, and ignores any subfolder. Then it moves the jpf files found to the Pictures folder.

#3 einsteinbqat

einsteinbqat

    Neowinian

  • Joined: 16-May 02

Posted 13 January 2013 - 20:52

By the way, you should have posted this in the Mac subforum.

#4 OP emmx

emmx

    Awesome

  • Joined: 20-February 05
  • Location: Michigan

Posted 15 January 2013 - 02:10

Try this. This seems to be working.

You run the app, and select a folder. The app looks for jpg in that folder only, and ignores any subfolder. Then it moves the jpf files found to the Pictures folder.

Thank you! That works, except in your screenshot it doesn't show to select "folders" in the "Ask for finder items" step. I think this is a huge step in the right direction. Now to find a way to do it that does not involve any interaction from me (selecting the folder every time it runs).

EDIT: I replaced the first rule (Ask for finder items) with the "Find finder items" where the KIND is Folder and the Name is Downloads (searching under my home directory). You got me to that point though. Thanks again!

#5 einsteinbqat

einsteinbqat

    Neowinian

  • Joined: 16-May 02

Posted 15 January 2013 - 02:13

Yes, sorry. I forgot to mention that you had to change files to folder. I took the screenshot before changing it, and just told myself that I would tell you, but obviously forgot.

Thank you! That works, except in your screenshot it doesn't show to select "folders" in the "Ask for finder items" step. I think this is a huge step in the right direction. Now to find a way to do it that does not involve any interaction from me (selecting the folder every time it runs).



#6 einsteinbqat

einsteinbqat

    Neowinian

  • Joined: 16-May 02

Posted 15 January 2013 - 02:27

In that case, try the following. Simply running the app should suffice.

#7 Marshall

Marshall

    ▇ ▂ ▃ ▁ ▁ ▅

  • Tech Issues Solved: 7
  • Joined: 22-June 03
  • Location: USA

Posted 15 January 2013 - 02:30

Moved Here

#8 OP emmx

emmx

    Awesome

  • Joined: 20-February 05
  • Location: Michigan

Posted 19 January 2013 - 15:39

I more or less used the same settings you told me to use, but a tad different. I attached a screenshot of what I am using now and it's working like a charm. Thank you!

Attached Images

  • Screen shot 2013-01-19 at 10.36.27 AM.png


#9 einsteinbqat

einsteinbqat

    Neowinian

  • Joined: 16-May 02

Posted 19 January 2013 - 22:13

Cool! :)

#10 bhsoundman

bhsoundman

    Neowinian

  • Joined: 23-September 13

Posted 23 September 2013 - 19:14

Hi Einsteinbqat,

 

First of all, thanks for the info. This workflow worked well for me. I have one glitch that I'm stuck on & was hoping that you may have some insight.

 

It's the same basic scenario, aside from I'm doing this multiple times with various file types and I'm trying to get a single workflow to accomplish it. As long as I have at least one of each file type, it works great, but if I don't have one, then it stops the script. IE: moving pdf, then jpg, then dwg would stop if there was no pdf to move.

 

I would like to be able to skip the move pdf action if a pdf isn't present to move for example & have the workflow continue.

 

I have a modified applescript that disables the move action, but it's a bit clunky & althopugh it seemed to work from within automator, it glitches when running the app.

 

Any help is greatly appreciated.

 

Thanks,

bhsoundman

 

#11 einsteinbqat

einsteinbqat

    Neowinian

  • Joined: 16-May 02

Posted 25 September 2013 - 22:26

Sorry for the late reply. I didn't see that you wrote something to me. I'll answer later tonight.


Hi Einsteinbqat,

First of all, thanks for the info. This workflow worked well for me. I have one glitch that I'm stuck on & was hoping that you may have some insight.

It's the same basic scenario, aside from I'm doing this multiple times with various file types and I'm trying to get a single workflow to accomplish it. As long as I have at least one of each file type, it works great, but if I don't have one, then it stops the script. IE: moving pdf, then jpg, then dwg would stop if there was no pdf to move.

I would like to be able to skip the move pdf action if a pdf isn't present to move for example & have the workflow continue.

I have a modified applescript that disables the move action, but it's a bit clunky & althopugh it seemed to work from within automator, it glitches when running the app.

Any help is greatly appreciated.

Thanks,
bhsoundman



#12 einsteinbqat

einsteinbqat

    Neowinian

  • Joined: 16-May 02

Posted 26 September 2013 - 01:48

You mean that you want to move different filetypes to different folders with one single workflow?

 

The easiest way would be to create multiple workflows (i.e. one for each filetype), and then creating one global workflow to execute the individual workflows.

 

You would not need to use any AppleScript.



#13 einsteinbqat

einsteinbqat

    Neowinian

  • Joined: 16-May 02

Posted 26 September 2013 - 02:16

Example
 
wf_jpg.png
 
wf_pdf.png
 
wf_png.png
 
wf_global.png

#14 bhsoundman

bhsoundman

    Neowinian

  • Joined: 23-September 13

Posted 26 September 2013 - 12:02

That works perfectly! I'm happy tht I don't need the Applescript! Simple & logical fix! Thank you for the help!!



#15 einsteinbqat

einsteinbqat

    Neowinian

  • Joined: 16-May 02

Posted 26 September 2013 - 19:20

That works perfectly! I'm happy tht I don't need the Applescript! Simple & logical fix! Thank you for the help!!


You're welcome.