Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
Don't you mean MkDir? :) –  Simon Johnson May 13 '09 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. –  David Negron May 13 '09 at 14:44
    
@Simon Johnson - either works actually, mine's more 'old school' :) –  Chopper3 May 13 '09 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 '10 at 9:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.