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

With ExtendScript how can I load all video files from directory into Premiere?

New Here ,
Oct 06, 2020 Oct 06, 2020

Copy link to clipboard

Copied

I would like to just enter the path to a directory and get ExtendScript to import all the video files into my Premiere Pro.  

I've gotten as far as getting them to load if I write the array out myself.

 

var myFiles = ["C:/Users/ooo/Documents/video_two.mov", "C:/Users/ooo/Documents/video_one.avi"];

app.project.importFiles(myFiles);  

 

How can I get it to load all the files just by giving it the 'C:/Users/ooo/Documents/' directory?

 

BONUS QUESTION: Is this where everything on the web comes to ask about scripting in Premiere Pro? There aren't any tags for scripting and I had trouble finding posts specificly about scripting.

TOPICS
Editing , Import

Views

594

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
New Here ,
Oct 06, 2020 Oct 06, 2020

Copy link to clipboard

Copied

LATEST

I got it by adding iterating over the items and passing the full path name with `fsName` because Folder, and/ or getFiles seems to cut the string in half and put a ~/ at the beginning, which Premiere Pro scripting doesn't go for. Though After Effects scripting takes truncated path names like that.

 

    myFolder = Folder("C:/Users/ooo/Desktop/").getFiles("*.avi")

    for (var i = 0; i < myFolder.length; i++) {
      app.project.importFiles(myFolder[i].fsName);
      }

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