Batch Script Automating Directory Creation

Microsoft Windows xp professional w/serv...
December 27, 2010 at 08:20:47
Specs: Windows XP, Pentium 3.4ghz / 3GB
I would like to set it up so I can enable users on a windows network to create a directory structure "on-demand" via a batch script that could be triggered from a shortcut (or a "favorites" link in Windows explorer"). Or some similar fashion.

I know how to make the script to create the directories in the same folder as the batch script, but what I'm thinking is I'd like to put the batch script on a shared drive and let users on the network navigate to any directory on their machine and with one click of a shortcut to the batch file have the directory structure created for them in whatever directory they happen to be in (in windows explorer).

Currently the way I'm doing it the shortcut makes the batch script create the directory structure only in the same directory where the batch script resides. Not very helpful to me. I obviously missing the part that tells it WHERE to create the folders.

If anyone can help me out with this batch script It would be much appreciated.

I'm not familiar with vbscript but would consider it if it gets the job done.

Thank you in advance for any help.


- I don't want them to have to copy the script from one location and into the directory they want the structure created.

- The Folder structure consists of a few folders and some sub-folders. Example below.

folder1 -


See More: Batch Script Automating Directory Creation

Report •

December 27, 2010 at 09:27:19
This will make struct as a branch of USERPROFILE, which is better than wherever the bat happens to be.

I'm working on a context menu bat to create .m3u playlist, which is trickier than expected. I'll keep at it.

md "%USERPROFILE%\one\abc\stuff"

Life is too important to be taken seriously.


Report •

December 27, 2010 at 09:37:04
Thank you for the response Mechanix2Go,

For my need the directory structure would need to be created many times a day in many different directories, by many different people. There is basically a team that needs to create this directory structure for every "case" they work on. There are constant new cases all the time.

I'd like to avoid the tedious manual creation of the same folder structure for every case worked.

If i could just go into a directory and have them click one thing that would set it all up for them each time, that would be ideal.

Any thoughts?

Report •

December 27, 2010 at 10:44:32
Since it sounds like the users are afraid of using the prompt...

Just create the structire , empty, and drag and drop it where needed.

Life is too important to be taken seriously.


Report •

Related Solutions

December 27, 2010 at 10:57:28
That's definitely one way to go.

But I'd rather cut the steps of having to navigate to one folder, copy, then going to another folder and paste. Since they'd already be using windows explorer and have direct access to the favorites in it, I thought I could just add a shortcut (accessible from the windows explorer window that they are already in) that they could click when they got to the folder they need to work in. so it would just be: go to the necessary folder, click, done.

Are there any command line options I should be using in the batch script that would create my folders in the "current working directory" (current in windows explorer) rather than the same directory the batch script resides in (referred to via a windows shortcut/favorite)?

Report •

Ask Question