Looking for a batch file or similar to make the same folder in about 200 other folders

DnetMHZ

Diamond Member
Apr 10, 2001
9,826
1
81
Lets say I have a drive with 200 top level folders call it the W: drive.

I want to insert a 2006 folder under each one of these top level folders.

What is the quickest way to do this?

<edit> this is on windows </edit>
 

skace

Lifer
Jan 23, 2001
14,488
7
81
You would run this command at the same level as the 200 folders from a command prompt:

 

statik213

Golden Member
Oct 31, 2004
1,654
0
0
this one works with long directory names that have spaces in them:

for /D %d in (*) do md "%d\2006"

the for /D iterates thru every directory below the current directory matching the * in paranthesis and assigns the direcotyr name into the variable %d. you then execute md "%d\2006" to create the 2006 directory as a subdir of %d.