• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Automation Blocks - Mapping Audio Channels and Moving/Renaming Files

Explorer ,
May 02, 2024 May 02, 2024

Copy link to clipboard

Copied

Hi Mathias,

 

The attached script is a combination of scripts you've helped me with in previous posts. It does the following to selected clips:

 

-Renames and modifies audio channels of clips with certain file names

-Imports a new copy of one file (2mix)

-Creates a new bin and moves the original 2mix to that bin (this is to temporarily protect it from the next change)

-Renames and modifies audio channels of the new 2mix

-Lays all tracks into the timeline in their assigned places

I want to go further with this script. In particular, move the original 2mix back into its original bin and delete that new, temp bin.

The issue is, after renaming the files, the script gets tripped up on any further action because it can't find the files that were selected.

I'm wondering how to resolve that error so I can continue with the script.

TOPICS
SDK

Views

168

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 03, 2024 May 03, 2024

Copy link to clipboard

Copied

Hi, @Mathias Moehl,

Can you check this out? I appreciate that.

 

Thanks,
Kevin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 04, 2024 May 04, 2024

Copy link to clipboard

Copied

LATEST

I wrote a function here which does the following:
It imports a footage file into a given target bin and returns the project item of it.
If there exists already an item with the same name in that target bin, the function renames the newly imported item such that it always has a unique name. To achieve that, the function first imports the file into a temporary bin and then renames it if needed before moving it to its final destination.

 

Using the function is very easy, just give it the file it should import and the bin where it should go:

Screenshot 2024-05-04 at 20.55.04.png

 

The implementation is a bit tricky. In a nutshell then renaming a file "oldname.mp4" inside a bin "\bin\subbin" to "newname.mp4", after renaming the variable of the project item still points to 

\bin\subbin\oldname.mp4

which does not exist anymore.

Hence, you have to create the string 

\bin\subbin\newname.mp4

manually and assign it to the project item, in order to still be able to access it.

Code is attached.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines