Import into Folder

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
mads
Posts: 33
Joined: October 15th, 2004, 6:38 am
Location: Denmark
Contact:

I want to import Files into specific Folders in my, instead of the root

I have a new Project with one new folder in
this work:
{
app.project.item(1).selected = true;
a = app.project.importFileWithDialog();
}

But why doesn´t this work?:

{
app.project.item(1).selected = true;
app.project.importFile(new ImportOptions(new File("c:\\b.tga")));
}

Mads Juul
User avatar
Disciple
Posts: 137
Joined: June 5th, 2004, 8:05 am
Location: Los Angeles, CA
Contact:

I'm not sure I understand you correctly. Couldn't you just select the folder and import? It will import into that folder already.
Why do you need scripting?

Alex
mads
Posts: 33
Joined: October 15th, 2004, 6:38 am
Location: Denmark
Contact:

I am working on a bigger script where I want to select a folder with the getFolderdialog(), and then import the subfolders with the bitmaps inside into After Effects, but I cant figure out how I can use the ImportFile(),
and get the bitmap into a folder in the project window instead of the root.

If I could get help to Import a bitmap with the path c:\\a.bmp
this would solve my problem.

Mads
mads
Posts: 33
Joined: October 15th, 2004, 6:38 am
Location: Denmark
Contact:

I found a Hack way to Import bitmaps into a folder, and even avoid the pop up screen when importing .psd.


-rename all Folders in Project Named 'Solids' to 'tempSolids'
-make a temp Composition
-but as many solids in the composition as the number of files you want to import
-find the newly created Folder 'Solids'
-replace the solids in the Folder Solids with the desired Files
-rename Folder 'Solid' to your personel choise
-delete temporary Composition
-rename all Folders named 'tempSolids' to 'Solids'
.mads
Post Reply