Create a specific Folder structure in the project and move files according their file extension

Hello,
Me again. After several tries with i give up and ask for help ( iam not the programmer dude and need to learn automatic tools first :slight_smile: )

Here is what i try to do (in two seperate Actions)

  1. Create a Folder with the name “Assets” and inside this folder create Sub-Folders like “Images”, “´Footage”, “Music”

  2. Copy all .jpg / .png / .pds etc. into Assets->Images; Copy all .wav/.mp3 into Assets->Music

and so on

I hope somone can give me some advise how to do this.

BR Dirk

Hi @Five-Birds,

No worries at all, we all start somewhere! Even though you’re jumping into quite complex automations right from the get-go, remember, it’s okay to feel a bit lost initially.

I’ve broken down your task into two separate automations. This way, you can learn more effectively, instead of dealing with a massive 50-line automation all at once! :sweat_smile:

The first automation creates a main “Assets” folder and then adds the “Images,” “Footage,” and “Music” sub-folders within it. Right now, this process is a bit roundabout, because we can’t directly create a sub-folder inside another. We have to create it at the root level, find it, and then move it into the desired folder. It’s a bit long-winded for now, but I’m planning some improvements for future updates that should make this process shorter and more straightforward.

For the second automation, it sorts all the footage in your project by file extension. If it finds a match with an image extension, it moves the footage to the Images folder, and so on for Music and Footage. You’re free to set the file extensions for the Images, Footage, and Music in the green section. It should look something like “.jpg.png.pdf”. Just string the extensions together without spaces, and the automation will use a property to check if a text element is included in this string.

I used Chat GPT to compile all the popular file extensions for images, footage, and music:
Images - .jpg.png.gif.bmp.tiff.svg.ico.webp.jpeg.raw.psd.ai.eps.pdf.xcf.tif.heic.xcf.indd.dds
Footage - .mp4.avi.mkv.mov.wmv.flv.webm.m4v.mpeg.3gp.rmvb.vob.ts.divx.ogv.m2ts.mpg.asf.mpv.rm
Music - .mp3.wav.aac.flac.wma.ogg.m4a.aiff.ape.alac.mid.amr.ac3.au.ra.opus.pcm.mp2.mka.dts
(feel fee to remove or add extensions for the lists)

The automation first looks for the folders (Images, Footage, Music). Then, if it finds the Asset folder, we create three text variables for the lists of extensions. We then go through the items in the project, and if an item has a file, we store its extension as a text variable (in lowercase). We then compare this file extension with each variable. If it matches any list of extensions, we move it to the respective folder.

Here are the files you can download:
Create Folders.zip (2.8 KB)
Organize Footage.zip (3.9 KB)

If you have any questions or if you prefer to have it as a single automation, just let me know!
Thanks,
Alon

Wow! I did not expect this so complicated, :slight_smile: Many Thanks! It works perfect.

BR Dirk