Create a new folder inside a project

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

Is there an easy way to create a folder inside a project? I was browsing a script in the library and it looked like it had to rename the "Solids" folder, and then make a new solid to get a new folder. Is that the best way to do it?

Thanks.
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

There is currently no easy way to create folders I'm afraid.

It's such an obvious feature request, I'm surprised I haven't submitted it already.
Also, I don't think there's an easy way of moving items in and out of folders,
which would also be useful.

Actually, thinking about it, maybe an alternate way would be to save an empty
project, then have the script import it. You should get a new folder each time
you import the project.

Paul T
mobopro

It is strange, not being to import into folders. From the UI, you just have to select the target folder and then import. In scripting, if you do:

myTargetFolder.selected = 1;

you'll select the folder, but the import will go into the root level. Has anybody found a way to do this?
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

I used to think this didn't work too, I guess it's just a matter of stumbling upon the right way of doing it.

Create a new project, make a folder and run this script:
{
app.project.item(1).selected = true;
app.project.importFileWithDialog();
}


If you create two folders and select the second one before running the script, it won't work. This is because
when the script selects the first item in the project window (i.e the first folder), the 2nd folder is still selected
as well and if more than one item is selected (or nothing is selected) it will import into the root folder.

So you may need to create a loop that goes through all items, setting "selected = false" just to make sure.

Paul T
Impudent1
Posts: 57
Joined: June 12th, 2004, 6:40 pm

ooh nice catch on the import project angle Paul

I will get on an update that incorporates that to allow subfolders
Impudent1
Posts: 57
Joined: June 12th, 2004, 6:40 pm

Well I finally got around to doing some playing with the project vs folder concept.

http://www.leapfrog-productions.com/Scr ... s_v1_9.jsx

I stripped out the other functions and made it with creating projects, this of course makes the appundogroup sorta not work but I am ok with that personally :)

the intersting note on this is that with the codebit moved you can go from creating top level folders to creating it as a cascade.

I am sure someone can work with that. Perhaps to create a script that queries the user for how many folders and subfolders, then creates edit text fields to fit those responses for the prefs save function. Then sending those thru the cascaded/non-cascaded functions.
payal1711
Posts: 12
Joined: August 3rd, 2004, 7:43 pm

Hi,

the script you posted doesnt seem to work or may be I am doing it wrong. This is what I guess that it creates a project and 6 folders in it and that is what I want. And if it is for this purpose, tell me how to make it run.

Correct me if that is not what this script does?

-Payal
Impudent1
Posts: 57
Joined: June 12th, 2004, 6:40 pm

Well for one its not posted as a final script, those are all in the actual scripts area, this was put up for discussion.

It has only been tested on windows so might not work on mac as well.
Post Reply