top of page
Search
  • Writer's pictureJoe Chris

Automate Cue Folder Creation Via CueDB, Excel, & String Concatenation

Working on larger projects typically involve multiple cues, with intense file organization needed to manage data between them. And creating folders for each cue can be a long and arduous process if you are doing it all manually. In this approach, we start with our CueDB session, and export it to excel where we generate a script we paste into the command line that will automatically create and name folders for each cue.



So here we have our CueDB session with the cue numbers and titles for each cue. Our goal is to generate a folder for each cue where we can store our session data and any other important information.



First we will go to the "Tools" drop down menu and select "export cue log", or use the hot key ctrl + e.



We want to export at least the cue # and title, though if there is any other information here you would like in your naming conventions feel free to add more. The formula below will be for these settings, but if you can understand how it works you can modify it to whatever you desire. Make sure to export to "excel" as the format.


Inside excel, columns A and B will be generated as above. I generated Column C by typing the following formula in cell C10 and dragging it downwards to C19


="mkdir"&" "&CHAR(34)&A10&" "&B10&CHAR(34)


This is an example of string concatenation. We use string concatenation to "add" texts together to create longer text. Between each & is a part of the text we are adding.


The first is "mkdir". This command will create a folder on both mac and windows. The & joins it with the next string, which in this case is a space. Whatever is between the quotes will be inserted into the final string. What happens if we want to use a quote in the name then? Well that is what CHAR(34) means.


So so far our string is:


mkdir "


Next we reference the cell we would like to use to derive the data from, this case being the cue number from cell A10. Then another space, the cue title from Cell B10, and finally another quotation mark.


This outputs: mkdir "1m01 Main Titles (Carwash in the Raw)" into C10


On the bottom right of that cell, there is a little box. If we copy and drag it downwards, it will duplicate the data with a relative location for the reference sells. So the Formula in C11 will reference cells A11 and B11 instead of A10 and B10.


At this point, we should create a master folder where we would like all these cues to be. Then inside the terminal/command prompt navigate to that folder. In excel, highlight cells c10-C19 and copy. Paste it in the command line and it should make all the folders. BE SURE YOU ARE IN THE MASTER DIRECTORY FOR THAT PROJECT BEFORE PASTING. Otherwise you will have folders for all of the cues in the wrong location and will need to move them.


Now that you understand the logic, you can use concatenation via "&" to add other fields or text to create a naming convention for whatever your needs.

Recent Posts

See All
bottom of page