is it possible to just specify a folder name and set that as the parentFolder for an object?
For example:
Code:
var compFolder = app.project.item.name("CHAR PRECOMPS");
newComp.parentFolder = compFolder;
entire script (which I shamelessly canniballised from Compify (Byron Nash, Edited and Improved by Paul Tuersley):
Code:
//select comps in project window and make comps from them
//add line boil preset to layer within created comp
app.beginUndoGroup("Precomp and Lineboil");
var selItems = app.project.selection;//set selected import items to an array
var myColl = app.project.selection;//use the selection
var i = 0;
//remove unneeded characters from comp name
for (i; i<myColl.length; i++) {
//add suffux to comp name and remove the file extension
var curItem = myColl[i];
var curName = curItem.name.substring(0, curItem.name.length-16);
//set comp to footage item dimensions and framerate
var curWidth = curItem.width;
var curHeight = curItem.height;
var curAspect = curItem.pixelAspect;
var curDuration = curItem.duration;
var curRate = curItem.frameRate;
//create comp and add layer and add preset
var newComp = projColl.addComp(curName + "_LB",curWidth,curHeight,curAspect,curDuration,curRate);//make new comp
var lcoll = newComp.layers;//variable for collection of layer objects in logoComp
lcoll.add(curItem);//add layer
var presetPath = "w:/Gumball/AE_Custom_Effects/CE_LINE_BOIL_V002.ffx";
var myPreset = File(presetPath);
newComp.layer(1).applyPreset(myPreset);
//direct comp to precomps folder
var compFolder = app.project.item.name("CHAR PRECOMPS");
newComp.parentFolder = compFolder;
}
app.endUndoGroup();