Articles

Creating Directory Structure

September 10, 2005 at 09:58:49
Specs: Windows 2000 Professional, Intel Pentium and 1 GB

I would like to create a directory structure using batch file like Folders/Subfolders/Subfolders etc, how do I do this? Thanks

Gaby


See More: Creating Directory Structure

Report •


#1
September 10, 2005 at 10:02:36

For starters, you use the backslash.

md 1
md 1\2
md 1\2\3

and so on


If at first you don't succeed, you're about average.

M2


Report •

#2
September 10, 2005 at 10:07:35

This is a good one, but when we have a complicated structure is there a way to use a more nice batch file, I do have programming experience but have not used Dos much, thanks for the reply

Gaby



Report •

#3
September 10, 2005 at 10:14:26

Hi Gaby,

Do you have an existing directory structure that you need to replicate?


If at first you don't succeed, you're about average.

M2


Report •

Related Solutions

#4
September 10, 2005 at 16:16:17

is there a way to use a more nice batch file

More nice!?!? *chuckling*

If the directory structure is that complex, do it by hand. Unless you're trying to copy the directory structure from one PC to many others, this just makes no sense. If you know what you're doing, you could recreate all the dir's on another PC faster than you could create/test the batchfile. If however, you're trying to replicate it on several other PC's then a batchfile wouldn't be a bad idea.

Mechanix told you how to do it, without a little more in-depth explanation of what you're trying to achieve he could never give you any more help than he already has. I'm not the worlds greatest batchfiler (I've asked M2 for help with a batchfile I wanted to write....and received it, thanks again M2!) but even I know your question needs to be a little more detailed to get any more help than you've already received. "more nice batch file" just isn't more detail.


Report •

#5
September 11, 2005 at 01:47:57

Hi Curt,

Thanks for the kind words.

Yeah, I don't yet see where we're going with this.


If at first you don't succeed, you're about average.

M2


Report •

#6
September 11, 2005 at 21:39:00

Sounds to me like gaby is asking how to make a directory tree with a single command and not build it up with the messy multiple md or mkdir commands.

md 1\2\3


Report •

#7
September 11, 2005 at 23:54:23

Hi FM,

You may be right.

I didn't know md 1\2\3 would work.

Old DOS habits die hard.


If at first you don't succeed, you're about average.

M2


Report •


Ask Question