Highlighted

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

New Here ,
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

53

Likes

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

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

New Here ,
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

54

Likes

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

Copy link to clipboard

Copied

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);
      }

Likes

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
Reply
Loading...
Oct 06, 2020 0