Aug 24, 2011
tom

How to write a dos batch script to create a folder structure?

Question

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

Answer

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 SourceTrunk
md SourceTrunkLibrary
md SourceTrunkProjects
md SourceTrunkTests

Best of luck.

Related posts:

  1. How can I automatically create a folder, assign a home folder and logon script automatically after a new User is created?
  2. migrating email, folder structure?
  3. how to create a user with access to one home folder for read and write?
  4. Copy a website and preserve the file & folder structure
  5. optimal folder structure for storing 100k files on a USB drive

Leave a comment