Pick Up Path of Folder for Macro - Pro Tools

I did find a way, but it is too long. I just made an extension of the above macro. So; the macro navigates to the session folder in Finder, copies the file path, goes back to ProTools, chooses Export Selected Files, presses the button Choose... and sets the folder to the earlier copied path+/Bounced Files. So yes, it works, but i don't like it. It is way too long.

The problem is what you already asked in the start topic; how to get the path of the current session in a variable.

Here is a demonstration. It works most of the times but i don't like the way how i did it.

Ok, i found a much easier way to navigate to the current PT session folder. A right click in the middle of the window brings up the location. I go to this location, and i get the current parent path in a variable, back to ProTools, enter Export Selected Clips, click Choose and fill in the new path+Bounced Files.

I used for trigger: shift+command+K, which is already Export Clips. So, now it will always select Bounced Files in the current Session Folder as export location.

When the macro has ran the Finder has the session folder open. I could close it, but i left it this way.
When you had no clips selected and you run the macro, the finder opens the current session folder, but PT will be the front application.

Try this!

Export Clips To Bounced Files.kmmacros (35.6 KB)

1 Like

I am back home but very impressed Fokke! Will try tomorrow morning! I think you just came up with what I’ve been begging Avid to do for years.

Best,
Ray

1 Like

Let me know how it goes. I also made a suggestion @ Avid for Bounced Files as default export folder, but in the meantime this macro works, i hope!

Here is a screen capture. But it goes fast.....

Still, sometimes the first try fails. 2nd attempt is successful. I have to see where it goes wrong the first try. Maybe i have to extend a pause somewhere. But then; how to make it “a first try” again?

One more note…I actually used dated folders WITHIN the Bounced Files
folder - one for each new day I work on the project…how could we add that?

CMD+SHIFT+K just opens regular export window for me in PT. When I go to KM
and click “TRY” I get an error message about not finding the window.

I think I found a pretty easy way for me to it.

CONTROL CLICK ON FOLDER,
hold down Option, then…
Select COPY AS PATHNAME

then in PT under CMD+SHIFT+K

type CMD+SHIFT+G for GO TO FOLDER

just paste path and you are there.

Maybe a more elegant way with KM?

If the file is selected in the Finder, then you can get it's path with the Finder Selection collection.

After that action has run, assuming a single thing is selected in the Finder, the Path variable will have the path of that selection.

That is what i used Peter.

CMD+SHIFT+K just opens regular export window for me in PT. When I go to KM
and click “TRY” I get an error message about not finding the window.

Hmm. When i import a macro it is first disabled, so i have to enable it first. Is that the problem?

You have to start the macro when you are in PT, not in Keyboard Maestro. Otherwise the macro will try to run in KM.

I put the macro in a folder that will only enable the macros when ProTools is running. Check if you have the correct PT version defined.

Will try again and use that collection feature. Good idea.

This pretty much does it...I modified your macro...as long as you have the
folder selected in Finder. My next job is that I have dated folders within
the bounced files folder I want to drill down to. Maybe I will add a
"pause".

Copy Path and Export Clip to Folder.kmmacros (7.18 KB)

Another year later....

Hi Fokke, thanks for this...anyway to attach the script itself? Would love to try it.

Best,

Ray Palagy

Hi Ray

Here you go.

Fokke van Saane

Open Session Folder.kmmacros (3.0 KB)

1 Like

Or even simpler.

I found the POSIX file thingie and how to "find and replace" inside AS. So now it is all in the AppleScript itself.

Current ProTools Session Folder.kmmacros (32.1 KB)

Thanks John again! Much appreciated...will try later.

Best,

Ray

John I was never able to get it to work...I ended up staying with what you sent previously...that is working well! Now I want to modify it to add

  1. if a folder with todays date exists open it and pick up that path

  2. if a folder with todays date doesn't exist create it and then open it

Hi John , the KM "Set Export Clip to Bounced Files" that you did for Ray, worked really well. I wanted to see if theres a way to put a if statement after the return keystroke before the open Button. in that (if statement )would look and see if a folder with todays date is there already, if so, than open it. If not create a folder with todays date, then open that.

Since the "Please Choose a Destination Folder " isn't a full path KM couldn't executed it.

DJ