Subfolder question

Hi,
I’m working on revising an automation I made a few years ago that organized my project for me automatically. I’ve figured most of it out, but am stuck on one thing. I often import other After Effects projects into a folder called “z_other AE Projects.” However, when I have the organizing loop look at the files and folders, I’d like to ensure that anything within that folder (even if it’s in a subfolder) doesn’t get moved. In other words, if I have a folder inside that folder that says “Assets” and then, within that, a folder that says “Images,” I don’t want anything in either of those folders to be moved when the project is being organized. I see that I can point the loop to a parent folder, but am struggling to figure out how to stop anything below that level from being moved.

Thanks!

Hi @skimber,

Great question! You can achieve this using two different methods. Here’s a more detailed explanation for each:

Method 1: The Easy Method

  1. Reset Specific Label Color: Initiate by looping through all items in the project. If any item’s label color is “Fuchsia”, change it to another color or remove the label color.
  2. Locate the Target Folder: Find the folder named “z_other AE Projects” within the root folder of your project.
  3. Apply Label Color: Assign a unique label color, such as “Fuchsia”, to this folder and all its contents. This includes all subfolders and files within them.
  4. Update Your Automation: Modify your existing automation to include a condition that checks the label color of each item. Exclude any item with a label color of “Fuchsia” from being organized or moved.
  5. Post-Organization Cleanup: After completing the organization process, consider removing the “Fuchsia” label color from these items, returning them to their original state.

This approach effectively uses label colors to mark and protect certain items from being moved by your automation. It’s a straightforward method that allows for easy identification and exclusion of specific files and folders.

Example -

Download -
filter project items - simple.zip (2.0 KB)


Method 2: The Advanced Method

  1. Initial Loop: Begin with a loop that iterates over all items in the root folder.
  2. Check and Collect: Within this loop, if an item’s name is not “z_other AE Projects”, add it to a new collection. If the item is a folder, loop through its contents and add them to your collection as well.
  3. Exclude Specific Folder: The key here is to exclude the “z_other AE Projects” folder and its contents from being added to your collection.
  4. Final Loop: Once you have this collection, you can run a loop on it with the “elements in collection” option. This collection will contain all items from the project except for those within “z_other AE Projects”.

This approach is more advanced as it involves a combination of loops and collections to selectively exclude the specified folder and its contents.

Example -

Download -
filter project items - advanced.zip (2.2 KB)

Feel free to ask if you need more details or assistance with the implementation!