ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

ExtendScript import file

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Will CavanaghExtendScript import file
by on Jan 5, 2012 at 5:56:25 pm

Hi, I'm pretty sure I'm doing more than one thing wrong here, but here goes... I'm trying to get AE to import a file from within a script.

Here's what I've got:

myfile = new File;
myfile = myfile.openDlg();
fpath = myfile.absoluteURI;

What happens when I run this is I get the file open dialog. I select a valid jpg image and click open. The open dialog closes, and I get an alert with the correct absolute path for the file. I click ok and get an alert saying "true" (the file object was successfully closed.) The problems comes in here: As soon as I open the file object, the I select file is deleted. The path that is returned for it is correct for where it WAS, but the file no longer exists at that location.

Also, I don't know how to tell AE to import a file object into the project.

So what's going on here? Is AE moving the file somewhere when I create the File object? Am I doing something wrong?

Return to posts index

Dan FredleyRe: ExtendScript import file
by on Jan 6, 2012 at 5:25:43 pm

I think you want ImportOptions.

Here's an example:

Dan Fredley

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved