1

I would like to be able to have a dos batch script that I could utilize to create a specific folder structure below what ever directory I may be in at any given time.

The specific folder structure that I need is:

[Directory:\] _Documentation

[Directory:\] _ProjectManagement

[Directory:\] Releases

[Directory:\] Source

[Directory:\] Source -> Trunk

[Directory:\] Source -> Trunk -> Library

[Directory:\] Source -> Trunk -> Projects

[Directory:\] Source -> Trunk -> Tests

1 Answer 1

4

Erm...is this a trick question, it looks kinda straightforward? if not then perhaps try the following in a batchfile somewhere in your path;

md _Documentation
md _ProjectManagement
md Releases
md Source
md Source\Trunk
md Source\Trunk\Library
md Source\Trunk\Projects
md Source\Trunk\Tests

Best of luck.

4
  • Don't you mean MkDir? :) May 13, 2009 at 13:09
  • Yeah I was afraid that the answer would be simple. I don’t usually work at the command line level now a days so I wasn’t sure if there were any new strategies for accomplishing this task. I guess being a coder puts me in the frame of mind that it would have been a bit more complicated. I thought that I would have needed some variable to give me a reference to the local directory in order to know where to create the folders. Yet another case of over engineering. Thanks. May 13, 2009 at 14:44
  • @Simon Johnson - either works actually, mine's more 'old school' :)
    – Chopper3
    May 13, 2009 at 19:13
  • On Windows you can usually (because command extensions are enabled by default) leave out creating the Source and Source\Trunk directories since intermediate directories are automatically created. Ah well, it can't be DOS anyway ... I hate when people msitag their questions -.-
    – Joey
    Feb 19, 2010 at 9:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .