Create new folder in DO13

HI there,

Love the new version 13. Quick comment...

If I right-click on a folder, there is no menu option to create a new folder under the highlighted folder. It would be great to be able do this from the context menu.

If I click 'New Folder' on the toolbar, it creates the new folder at the root directory rather than on the highlighted folder.

So the only option seems to be to open the folder first then right-click --> New --> Folder or use the New Folder option on the toolbar once the folder is opened.

I was expecting that with the new expandable folders that I would be able to create a new folder under the highlighted folder without having to open it first, if that makes sense.

+1 for this feature.

1 Like

Add a context menu like this

@nodeselect
@nofilenamequoting
CreateFolder NAME="{filepath}\New Folder {date|yyyyMMdd} {time|HHmmss}"

or like this

@nodeselect
FileType NEW=directory PATH={filepath}
3 Likes

Many thanks for your help, lxp !

Thanks for your help.

I don't know where to start with this - apologies but I don't know much about the engine room in DO. Which setting do I access to set this up?

See How to use buttons and scripts from this forum

Open Settings> File Types
2024-02-01_112718

double click on All Folders> File Type> Context Menu> click New

COpy paste the command here...
2024-02-01_112903

3 Likes

Thank you! That was really helpful.

I used the second script (quoted above) which creates a folder and names it 'New Folder'. The only issue is that it looks like I can rename it but within a second it auto-saves. Is there a way to get it to wait until I rename it?

Yes, with these modifications:

@nodeselect
@nofilenamequoting
CreateFolder NAME="{filepath}\{dlgstring}"
@nodeselect
FileType NEW=directory PATH={filepath} NEWNAME="{dlgstring}"  

The second button will append a counter if the folder already exists.

4 Likes

That is awesome!! Thanks so much for your help!

This is great, I use it all day. Can I please ask how to automatically expand the directory after creating it?

I have tried to adjust the code below but not finding the right command:

@nodeselect
@nofilenamequoting
CreateFolder NAME="{filepath}\{dlgstring}" 

Add a new line

Go EXPANDBRANCH

Yes I tried this, but it still is collapsed after creating the new folder.

I have attached an example of what I mean. When I create Child_2 its not expanded.

Do you want to expand the folder tree or the file display? Do you want to navigate to the new folder?

File Display. But just that folder after creating it. So for example that code above I create a new folder somewhere in the file display, then i want that to be expanded, but leave everything else as is.

@sendkey:alt+down

seems to work (if you haven't changed the default hotkey).

1 Like

Thanks, This works! You are a life saver. I edited this and removed all the issues I was having (in this post), I restarted dopus and now it works as expected.

Thank you!
Is there a way to link this to the default CTRL+N command? I mean opening the window with all its options (create multiple folders, etc.)?
And do the same with CTRL+O to create a new .txt file?

You could modify the CreateFolder hotkey like this:

Go FROMSEL
CreateFolder
Go BACK

and the FileType hotkey like this:

@nodeselect
FileType NEW=.txt PATH={filepath} NEWNAME="{dlgstring}"
1 Like

Here are your options:
//Displays the parent folder with the new folder unexpanded
Go EXPANDBRANCH
//Displays the parent folder with the new folder expanded
@sendkey:alt+down
//Displays the contents of new folder
Go "{filepath}{$FolderName}"