Command or Macro to create a pre-defined list of directories and files?

When working with one of my programs, I find myself always creating the same new directories as a starting point for each project. Directories with names like "tex" and "renders" and "finals" etc.
I'd like to be able to run a command that will create all of those new directories in the current source directory.

Or similarily, have it ask for a new directory name, and then create that directory with those sub-directories in it.

I'd also like to copy a text file from a specified directory into this directory as part of the process. So the final result would be a new directory with new empty subdirectories in it, and a copied text file.

Is this possible?

You'll need the commands CreateFolder and Copy.

https://www.gpsoft.com.au/help/opus12/index.html#!Documents/CreateFolder.htm

https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Copy.htm


How to use buttons and scripts from this forum

1 Like

Put the stuff you want into a folder somewhere, e.g. C:\My stuff\Template Folder then make a button which runs this:

Copy "C:\My stuff\Template Folder\*" TO {sourcepath$}

That will copy everything in the template folder to the current folder.

1 Like

As an extra in case you wish to explore further, this is one of my folder creation buttons if you want to play with it. i've changed it to suit your listed folders just to give you an idea but feel free to edit it and tweak it if you want to explore.

CreateFolder NAME="{date|yyyy-MM-dd} {dlgstring|Please enter a Description:}/tex|renders|final"

This creates a dated folder with a user entered description with 3 sub directories.
folders

2 Likes

Oh thanks, I will check this out too!