Add Multiple Folders

Q & A for the old 2X Explorer file manager. For other topics, please use the corresponding forum.

Moderators: fgagnon, nikos, Site Mods

Post Reply
115-1024880027

Post by 115-1024880027 »

Could I specify multiple new subfolders in one dialogue?  I want to do it repeatedly, so would like it entered all at once.
User avatar
rir3760
Member
Member
Posts: 19
Joined: 2002 Feb 10, 00:11
Location: Mexico

Post by rir3760 »

As far as I know there is no specific (built-in) method to create several folders at once in 2xExplorer.

But there is a workaround for what you need (creating multiple folders) using the "Generate Batch" option, this is an example:

You want to create 10 folders (New_Folder_01-New_Folder_10), what you need to do is:

1.- In the right pane navigate to the target folder.
2.- In the left pane select 10 files/folders and hit Control+B.
3.- You get the dialog "Batch File Creation", now type:

Md "$R\New_Folder_$01"
and press enter.

4.- Next you get a confirmation dialog. Check the batch file and edit as needed.

Hope this helps
User avatar
nikos
Site Admin
Site Admin
Posts: 15802
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

nice hat-trick this one!

still, why not select the 10 (arbitrary) files in the active folder and use a template like mkdir New_Folder_$01 -- saves you a bit on keystrokes  :)
115-1024880027

Post by 115-1024880027 »

I was thinking more like:

Add folder: folder1/folder2/projects/floppy1

And attempt to put some order to stuff copied from tons of floppies. Just type the above in one go and drag all files from A: -> C:

Anyway, I might ask rir what is the significance of this step in what you were saying:
>2.- In the left pane select 10 files/folders and hit Control+B.
User avatar
nikos
Site Admin
Site Admin
Posts: 15802
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

> In the left pane select 10 files/folders and hit Control+B

That's a little trick to "fool" 2x's batch file generator to create 10 sets of commands (it doesn't matter which 10 since the names themselves aren't being used in this particular example).

All that matters is to get 10 commands and have 2x automatically generate names using the special $01 counter. As part of the mkdir New_Folder_$01 template it will generate the folders: (try it and see! )

New_Folder_01
New_Folder_02
...
New_Folder_10

I have to admit that I haven't really understood what you're trying to do -- why you would have to repeatedly enter the same folder subtree. The certain thing is that you can't use the GUI to enter subfolder names.

What you could do though is to use the command line within 2x in conjunction with the DOS mkdir command each time you wanted to create a subtree:

$ mkdir folder1\folder2\projects\floppy1

this would be stored in 2x's command history and you could be able to reissue it at a later stage with minimum effort using the command history [Ctrl+F10] command. For more info on command execution checkout tips & tricks #2
Post Reply