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.

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.

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.

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.

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

    • That is $130 more than I paid for my 4TB a year ago. How is this a deal?
    • JetBrains' new AI-first 'IDE' JetBrains Air is now on Windows by David Uzondu JetBrains has announced that JetBrains Air, its Agentic Development Environment (ADE) is now available for download on Windows x64 and ARM. You might not be familiar with JetBrains Air. It's this new desktop app that the company launched back in March 2026 to let developers hand off tasks to AI agents instead of writing every line manually. You can see it as more of an Agentic Development Environment (ADE) rather than a traditional Integrated Development Environment (IDE). The latter builds its features around a central text editor, while the former arranges everything around the AI agent itself. Here's how JetBrains describes it: Air was born from the ashes of Fleet, an experimental editor that the company quietly killed in December 2025 after realizing that competing directly with VS Code was a losing battle. The company repurposed Fleet's lightweight, modern architecture to build Air, transforming a basic code editor into a workspace for running multiple AI agents. When Air launched, it was only available for macOS. It wasn't until earlier this month that Linux users got a chance to play with the software. Now that Air is on Windows, you can do things like map out a complex feature in Plan mode and watch an AI write the implementation plan to a markdown file before writing any code. You can iterate on this plan, add references to specific classes or files, and choose whether to run the agent locally or inside an isolated Git worktree. Running agents in parallel means you can have Claude refactor a database schema in one branch while Codex writes tests in another, leaving you free to do other important things. You can even set up a pipeline where Claude writes the code, and Codex reviews it. At the moment, Air is free. If you have a JetBrains AI Pro or Ultimate subscription, you get full access to the built-in agents, though there's also the option to Bring Your Own Key (BYOK) to run APIs from Anthropic, OpenAI, or Google. If you're interested, here are the download links for both x64 and ARM64.
    • Depending how you’re wiring it internally, but try to put it inside conduit, that way in the future you can more easily replace cables, compared to running inside studs alone At least cat6a too
    • I bet Meta has lots of info on you anyway, gathered by other means. And Google, and Microsoft, and every other tech giant. If you use some form of modern electronic device, they own you already...
  • Recent Achievements

    • Reacting Well
      NovaEdgeX earned a badge
      Reacting Well
    • Week One Done
      NovaEdgeX earned a badge
      Week One Done
    • One Year In
      BA the Curmudgeon earned a badge
      One Year In
    • Conversation Starter
      rosiecharles earned a badge
      Conversation Starter
    • First Post
      KMilenkoski1202 earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      530
    2. 2
      +Edouard
      264
    3. 3
      PsYcHoKiLLa
      149
    4. 4
      Steven P.
      98
    5. 5
      macoman
      60
  • Tell a friend

    Love Neowin? Tell a friend!