Renaming with folder name from farther up the path

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Hi folks. Long time Hazel user, but I've run into something I'd like to be able to do that I'm not sure is possible. I'm doing music production inside of Cubase, and I'd like to be able to rename my audio files that are created within a project and copy them to a different folder. More specifically, I'm recording stems on tracks that I'd like to retitle with the project name and copy to a separate stems folder that would then have them in a subfolder with the project name.

In a Cubase project, the folder structure is as follows:

Project folder (this is the name I'd want to copy)
- Project File
- Audio folder (this is where the files I want to copy get recorded)
- Images
- Mixdown
- assorted versions and backup files are also in here.

The audio files in question all have the word "PRINT" appended to them to differentiate them from the I know it's possible to rename something with the source folder appended, but in this case that'd just put the word "Audio" at the front. Is it possible to grab the name of the project folder and use that to rename files in the audio folder?
JZilla
 
Posts: 8
Joined: Sat Apr 22, 2023 8:15 pm

You can try using a nested condition. I can't tell from your example because I think the indentation got removed, but if the project folder is the one that contains the Audio folder, you can use a nested condition within a nested condition each matching the enclosing folder. That would allow you to go to levels up to grab the name.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

That's great, I'll give it a try. Thanks for the suggestion!
JZilla
 
Posts: 8
Joined: Sat Apr 22, 2023 8:15 pm

JZilla wrote:That's great, I'll give it a try. Thanks for the suggestion!


Was just wondering how you went with this, and how you use Hazel for music production in other ways?
Jewellistic
 
Posts: 1
Joined: Sun Sep 17, 2023 11:55 pm

Hey Jewellistic, sorry for the late reply, I had notifications disabled. I didn't end up getting it to work, I ran into some non-Hazel related export issues that led me to give up on trying to do things this way. I'm working on another way to do things, I'll let you know when I've made some headway.

As for other Hazel uses in a music production setting, there are a few things that I use it for quite a bit. One of the daily things is file renaming. I use Cubase with a large scoring template, and when I'm exporting stems from a cue I've got them all routed to group channels. I've named these tracks with a "==" at the end of the track name, so when I hit Export Audio Mixdown, I have a Metagrid Pro button triggering a Keyboard Maestro macro (I use all the automated help I can), it selects my export preset, and types == in the track search field, making it pretty effortless to just select the stem groups. This whole process saves 10-15 seconds, which isn't much, but ensures that I'm exporting the correct format, sample rate, bit depth, etc., and not making mistakes because I'm moving too quickly. The exported files have a "==" at the end of their filenames, but Hazel watches my project folder, and if a music file that's older than 5 minutes has a "==" at the end, it removes that, leaving me with clean filenames.

Hazel watches my Sequences folder and if it sees a new movie file (an exported score preview) or an audio file with Score Preview at the end, it'll copy them to a Dropbox folder that's shared with producers and directors.

In situations that I'm working with a collaborator (music editor, another composer, etc.) and want to be sending them stems, Hazel watches my project stems folder, if I put the stems from a new cue in there in a folder it will zip them, copy them to a shared Dropbox folder, and move the originals to a Sent folder.

If I'm finished a project, I've got a Metagrid/Keyboard Maestro macro that'll tag it "To Be Backed Up", which moves it to an external backup drive, sorts it into a monthly folder based on the date last modified, and removes the tag.

Then there's all the usual non-musical stuff, keeping invoices and receipts in order, downloads organized, and generally making sure that my computer is less cluttered than my brain. It's a pretty great system, not without its bugs and kinks, but it sure makes my life easier.
JZilla
 
Posts: 8
Joined: Sat Apr 22, 2023 8:15 pm


Return to Support

cron