Skip to main content
PFuerst
Inspiring
August 25, 2022
Question

Create number of Project folders with Automation Blocks

  • August 25, 2022
  • 3 replies
  • 2099 views

Hey,

I had a new idea for a simple Automations Blocks script. As I find myself sometimes in need to create a set of folders for my Compositions in the project bin I thought I might create a script to do so. However I have a couple of problems.

At the start I want the script to ask for the number of folders it will create and how to Name those(a number should also be added to the end of the naming) as well as if it should also put in a "Pre-Comps" folders(as I always find myself creating one in there as well). If I have a folder selected in the project it should paste it there otherwise I guess it would be nice to just put it in the root.

I started the script and I'm able to add one folder and the Pre-Comnps folder to the Project, however it will not take into acount the number I have added in the dialog(maybe it does but created all of the folders in top of each other as it doesn't know if it should increment the name. But I have no idea at the moment how to tackle this. I have attached my script so far.

Maybe someone can take a look and add nice features that I might not have thought of yet.

Best

This topic has been closed for replies.

3 replies

Mathias Moehl
Community Expert
Community Expert
September 18, 2022

Here is your tool 🙂

The most tricky part was picking the right parent bin. I decided to create a separate function, which checks if only exactly one project bin is currently selected. If so, it returns this bin, otherwise the root bin.

To create the numbered bin names, I just used a block which combines several strings into one (namely the string for the name that the user entered plus a space symbol plus the number. Note that you can delete the space or replace if by a "-", for example, if you want instead of "name 1" something like "name1" or "name-1".

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
PFuerst
PFuerstAuthor
Inspiring
March 30, 2023

Hey Mathias, I was wondering if you could also increment the folders by a set value(like 10) so set the first one is named 010, the second 020,... which is good for vfx work where shots are named this way

Mathias Moehl
Community Expert
Community Expert
March 31, 2023

Hi Pascal,

the green "count with" block has a "by" parameter at the end. If you change it from 1 to 10, it will could 0,10,20,30,... instead of 0,1,2,3...
Note that the variable "number of folders" is then not really the number of folders you create, but the number of the last folder. So you count from 0 to number of last folder in intervals of 10.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Mathias Moehl
Community Expert
Community Expert
September 18, 2022

Hi Pascal,

sorry for the late reply! Essentially you need to use a count loop and then create the folder inside the loop. I will look at your code now for a more detailed answer.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
PFuerst
PFuerstAuthor
Inspiring
September 9, 2022

I guess I could also just create one set of folders with a pre-comps folder in it and duplicate it a couple of times as I need it. But it would be interessting to know what I did wrong in my setup.