Wednesday, July 26, 2023

Re: [Avid-L2] Batch Script help? #OffTopic #workflow

I don't have the kind of experience you need for scripting, but have you looked at PostHaste? I use this all the time for project template propagation and at least for my needs, works great. You may have already gone down this road, but if not, worth looking at.

On Wed, Jul 26, 2023 at 4:54 PM kenton van natten <kenton.van.natten+AvidL2@gmail.com> wrote:
I've done a ton of Googling in the last 24 hours and may be more confused than I started. I've asked on various online forums dedicated to such things and, to date, have received no responses. So, because I know some pretty intelligent people are on this list, I decided to try you.

The long and short of it is that I've written a simple batch script to create a project folder template:

set /p projectName="set the name of the project"

MkDir "Y:\%projectName%"

PAUSE

xcopy "T:\ProjectTemplates\23-000_ProjectTemplate\" "Y:\%projectName%" /e

Basically, it asks the user to enter the name of the project. Then it makes a folder on "Y" with that project name. Next it copies the template folders from "T" to the folder on Y. All that works great. 

However, all of my folders and files inside Y:\projectName are still named "23-000_Project Template" I've been using Bulk Rename Utility to rename them. Some people using this are intimidated by the Bulk Rename Utility interface. The simplest solution is to have the rename happen when the script is run to make it invisible to the end user.

In short, I need anything named with the string: 23-000_Project Template inside Y:\projectName to inherit the %projectName% variable.

ie, 23-000_Project Template-ASSETS becomes %projectName%-ASSETS

I'm sure it's something simple where I need the right combination of "find and replace" syntax. I found some related posts on StackOverflow, but the information they provide overwhelms me.

Do any of you have experience writing batch scripts?

Thanks

--
kenton van natten, post-production mercenary

_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#136261) | Reply To Group | Reply To Sender | Mute This Topic | New Topic
Mute #offtopic | Mute #workflow
Your Subscription | Contact Group Owner | Unsubscribe [administrator242.death@blogger.com]

_._,_._,_

No comments:

Post a Comment