How to create multiple folders at once? 1..50

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Lenry
New Member
New Member
Posts: 1
Joined: 2012-06-11, 07:04 UTC

How to create multiple folders at once? 1..50

Post by *Lenry »

I know if I write for e.g. folder1|folder2|folder3 into the New Folder dialog TC creates three folders named folder1, folder2 and folder3. That's great.

Is there a regexp for a range of naming them? So if I need 50 folders, can I just write folder{1-50} and TC would create them named folder1, folder2, etc to folder50, or something like that?

Thank you
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No there isn't, and it cannot be added that easily because "folder{1-50}" is actually a valid folder name.
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9388
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

2Lenry
You may try extDir utility.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Stefan2
Power Member
Power Member
Posts: 4157
Joined: 2007-09-13, 22:20 UTC
Location: Europa

PowerShell: create 50 folders or files at once

Post by *Stefan2 »

For such tasks have a button, opening PowerShell with current dir as path:

CMD: PowerShell -NoProfile -NoExit
PARAM:
START:
ICON: powershell.exe
TOOLTIP: Launch PS in current dir


Now go to your "main" folder,
execute that button to open PowerShell and type


1..50 | ForEach-Object{ New-Item -Path $_ -ItemType directory }


Or in short:
1..50|%{MD $_}

1
2
3
...
50


Or formated to two digits and with Name "Test_":
1..50|%{ MD("Test_{0:D2}" -f $_) }


01
02
03
...
50



Or create hundred files, formated to three digits:
1..100|%{New-Item ("Test_{0:D3}.txt" -f $_) -Itemtype file}


001
002
003
...
050



# # #

That feature is now built-in



Total Commander 9.10; 2017

Added:

Create directory (F7), create a range of numbered directories:

[C] placeholder takes same options as in multi-rename tool,

e.g. <1-20>[C10+5:3] create 20 folders, starts at 10, steps by 5, uses 3 digits width
010
015
020
025
...

e.g. <5-10>test[C] creates folders test05, test06, test07, test08, test09, test10.
The number of digits is determined by the highest number, but can be set via parameter, e.g. [C:2]


e.g. <1-50>Folder [C]-Test
Folder 1-Test
Folder 2-Test
...
Folder 12-Test
Folder 13-Test
---
Folder 24-Test
...
Folder 50-Test



e.g. <1-50>Folder [C:2]-Test
Folder 01-Test
Folder 02-Test
...
Folder 12-Test
Folder 13-Test
---
Folder 24-Test
...
Folder 50-Test



e.g. <1-50>Folder [C:3]-Test
Folder 001-Test
Folder 002-Test
...
Folder 012-Test
Folder 013-Test
---
Folder 024-Test
...
Folder 050-Test


. . .

- - -

Umschalt+F4 >>> Neue Datei erstellen.

Dort rechts auf den PlusMinus-Button klicken und Folgendes auswählen:

<1-10>[C]

oder auch
<1-10>[C]_Test.TxT

oder
<1-10>[C]te neue Testdatei.tXt

oder
<1-123>Neue Datei Nummer_[C:3].txt





 
Post Reply