Batch Scripts

Oakley – Automation Engage!

Greetings fellow creatives out there! For this first-time post in a long time I’d like to share a Batch Script I finished writing last night and maybe get some feedback on the design and perhaps even help out some of you who are short on time like me and need a fast intuitive way to create all those media folders to contain your works of genius. This Batch Script in particular is for Adobe Premiere Pro users who would like to automate the folder hierarchy for the vast mediums used to create video projects.

So let’s dive in . . .

Note: The following tutorial is for Windows Users (I plan to create a similar script for Mac users in a future post) . . .

Now, first we’re going to create a .bat file using Notepad. If you have another text editor you’d like to use that’s fine, but when we’re finished editing the script, the last step is very important so pay attention.

To keep it simple, let’s open the Start Menu> Search for Run> Open Run> Type Notepad >Click ‘Ok’ or press Enter.

Once Notepad is open, copy and paste the following script:

cls
::
::

::

@Echo Off
:: Hide Following Commands

color a
:: Changes Text to Green

Echo.
Echo This batch script will create Adobe Project Folders in your C:\ Directory.
Echo.

:try
SET /P ANSWER=Do you wish to continue, Y/N?
Echo.

if /I {%ANSWER%}=={Y} (goto :START)
if /I {%ANSWER%}=={N} (goto :END)
goto :catch

::if/then statement to confirm .bat file start by user

:catch
Echo Cheif Engineer, Scotty says try typing Y or N . . .
Echo.
Timeout 3 >nul
goto :try

::Try/Catch Block for user input error

:START
echo Command Accepted, engaging…
Timeout 1 >nul
echo.
Echo Batch Creating Adobe Project Folders with Subfolders…
Timeout 1 >nul

cls
@Echo On
::Reveal commandline functions.

MKDIR C:\New_Adobe_Project\
MKDIR C:\New_Adobe_Project\Pre_Production
MKDIR C:\New_Adobe_Project\Adobe_Project_src
MKDIR C:\New_Adobe_Project\Adobe_Project_src\Adobe_AE_src
MKDIR C:\New_Adobe_Project\Adobe_Project_src\Adobe_Encore_src
MKDIR C:\New_Adobe_Project\Adobe_Project_src\Adobe_Photoshop_src
MKDIR C:\New_Adobe_Project\Media\Video
MKDIR C:\New_Adobe_Project\Media\Images
MKDIR C:\New_Adobe_Project\Media\Graphcis
MKDIR C:\New_Adobe_Project\Media\Graphcis\Lower_Thirds
MKDIR C:\New_Adobe_Project\Media\Graphcis\Titles
MKDIR C:\New_Adobe_Project\Media\Music
MKDIR C:\New_Adobe_Project\Media\SFX
MKDIR C:\New_Adobe_Project\Media\VFX
MKDIR C:\New_Adobe_Project\Media\VFX\AE_Compositions
MKDIR C:\New_Adobe_Project\Export
MKDIR C:\New_Adobe_Project\Export\Hi_Rez
MKDIR C:\New_Adobe_Project\Export\Lo_Rez

@Echo Off
::End of Batch Create, hide remaining commandline functions.
Timeout /t 2 /nobreak >nul

cls

Echo.
Echo Folders Created: Adobe Project Src and Media Folders with Subfolders
Echo.

Echo Video, Images, Graphics, Music, SFX, and VFX
Echo.

Echo Press any key to go to directory where folders were created.
Echo.

:: Message to indicate batch create was succesfful!
Echo.

Pause > nul

%SystemRoot%\explorer.exe C:\

:: Open’s C:\ Directory to where folders where created.

Echo.
Echo Thank you and have a nice day!

Timeout 3 >nul
Exit

:END

Echo Batch script terminated…
Timeout 5
exit/ b 1
::Wait 5 seconds and exit

::

Now the important part of the code if you want to customize the exact folders being created is this block here:

MKDIR C:\New_Adobe_Project\
MKDIR C:\New_Adobe_Project\Pre_Production
MKDIR C:\New_Adobe_Project\Adobe_Project_src
MKDIR C:\New_Adobe_Project\Adobe_Project_src\Adobe_AE_src
MKDIR C:\New_Adobe_Project\Adobe_Project_src\Adobe_Encore_src
MKDIR C:\New_Adobe_Project\Adobe_Project_src\Adobe_Photoshop_src
MKDIR C:\New_Adobe_Project\Media\Video
MKDIR C:\New_Adobe_Project\Media\Images
MKDIR C:\New_Adobe_Project\Media\Graphcis
MKDIR C:\New_Adobe_Project\Media\Graphcis\Lower_Thirds
MKDIR C:\New_Adobe_Project\Media\Graphcis\Titles
MKDIR C:\New_Adobe_Project\Media\Music
MKDIR C:\New_Adobe_Project\Media\SFX
MKDIR C:\New_Adobe_Project\Media\VFX
MKDIR C:\New_Adobe_Project\Media\VFX\AE_Compositions
MKDIR C:\New_Adobe_Project\Export
MKDIR C:\New_Adobe_Project\Export\Hi Rez
MKDIR C:\New_Adobe_Project\Export\Lo Rez

You can change these names to anything you like, but it’s important to realize that if you add any space to your folder name, it will tell Windows to create a separate folder hence is why I use underscores. Also, if you’re wanting to add a folder hierarchy, use the ‘MKDIR’ command followed by the desired directory path name.

Example: MKDIR C:\Project_Name\Subfolder_Name\etc . . .

Now the last part . . .

Save your notepad project  via File> Save As> “Project Name.bat” >Save as Type>All Files “*.*”

The last two steps are the most important. Make sure to save the file as anything you desire but end it with .bat. What is more, you must select All Files in the Save As Type dialog. This will keep it from saving as “Project name.bat.txt” which will not work.

And there you have it! I hope it helps and that you leave a comment!

Serving with nobility,

-Rob Oakley, Creative Collaborator