-
ExtendScript import file
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;
alert(fpath);
alert(myfile.close());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?
getnmd.com
nationalboston.com