Mac/Automator - How to ignore subfolders in search?


Recommended Posts

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.

  On 13/01/2013 at 20:10, emmx said:

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.

  On 13/01/2013 at 20:45, einsteinbqat said:

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!

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.

  On 15/01/2013 at 02:10, emmx said:

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).

  • 8 months later...

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

 

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

  On 23/09/2013 at 19:14, bhsoundman said:

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

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.

This topic is now closed to further replies.
  • Posts

    • Sayan Sen, do you think one day an image of the Windows Vista desktop or the wallpaper could be used in the primary image of an article?
    • Big fan of EAC Here's a good non-default naming scheme I found on the web (can't take credit) File Name Scheme - %albumartist%\%year% - %albumtitle%\%tracknr2% %title% Various Artists Naming Scheme - Various Artists\%year% - %albumtitle%\%tracknr2% %title%
    • Hello, Probably the simplest way of doing this would be to add a video card to your computer.   Regards, Aryeh Goretsky  
    • Check out Lisa Melton's GitHub transcoding scripts https://github.com/lisamelton/video_transcoding
    • ChatGPT's Advanced Voice Mode gets a significant update to make it sound more natural by Pradeep Viswanathan OpenAI introduced Advanced Voice Mode last year alongside the launch of GPT-4o. This feature uses natively multimodal models, such as GPT-4o, and can respond to audio inputs in as little as 232 milliseconds, with an average of 320 milliseconds, similar to human response time in a typical conversation. It can also generate audio that feels more natural, pick up on non-verbal cues, such as the speed you’re talking, and respond with emotion. Early this year, OpenAI released a minor update to Advanced Voice Mode that reduced interruptions and improved accents. Today, OpenAI has launched a significant upgrade to Advanced Voice Mode, making it sound even more natural and human-like. Responses now feature subtler intonation, realistic cadence—including pauses and emphasis—and more accurate expressiveness for certain emotions such as empathy and sarcasm. This update also introduces support for translation. ChatGPT users can now use Advanced Voice Mode to translate between languages. Simply ask ChatGPT to start translating, and it will continue translating throughout the conversation until instructed to stop. This feature effectively replaces the need for dedicated voice translation apps. For now, the updated Advanced Voice Mode is available only to ChatGPT paid users. OpenAI also noted that there are some known limitations with this latest update, outlined below. This update may occasionally result in minor reductions in audio quality, such as unexpected variations in tone and pitch—especially noticeable with certain voice options. OpenAI expects to improve audio consistency over time. Rare hallucinations in Voice Mode still persist, sometimes producing unintended sounds resembling ads, gibberish, or background music. While some minor limitations remain, the steady stream of improvements points to a future where the line between human and AI conversation becomes increasingly indistinguishable.
  • Recent Achievements

    • Week One Done
      maimutza earned a badge
      Week One Done
    • Week One Done
      abortretryfail earned a badge
      Week One Done
    • First Post
      Mr bot earned a badge
      First Post
    • First Post
      Bkl211 earned a badge
      First Post
    • One Year In
      Mido gaber earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      486
    2. 2
      +FloatingFatMan
      264
    3. 3
      snowy owl
      242
    4. 4
      ATLien_0
      223
    5. 5
      Edouard
      191
  • Tell a friend

    Love Neowin? Tell a friend!