Importing a folder with Extendscript adds extra nameless bin that I don't want
Hi, I'm writing a script to automatically import files rendered from After Effects into Premiere with Extendscript. All my projects have the same folder structure. The folder I want to import is "AE/16x9/" and I import it into a bin called "AE" which is created by the script if it doesn't exist yet. I got it working so far with this code:
importae: function() {
app.enableQE();
var projPath = app.project.path;
var projName = app.project.name;
var projFolder = projPath.slice(0,(projPath.length-projName.length));
var importFolder = projFolder + "AE/16x9/";
var myFile = [];
myFile[0] = importFolder;
var nameToFind = 'AE';
var targetBin = $._PPP_.searchForBinWithName(nameToFind);
if (!targetBin) {
targetBin = app.project.rootItem.createBin("AE");
}
app.project.importFiles(myFile,true,targetBin);
},
The only little problem I have is that it adds an extra nameless bin in the structure as shown in the image below.

I can't figure out why it does this and how to avoid it. Hopefully someone can tell me how to fix this. Thanks!
