Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to create a script, which can be activated through the right-click menu in Windows, which will create a pre-defined folder structure?
Every time we get a new update at my work I have to make a new “update-record” inside a folder. Each update-folder contains exactly the same folders, more or less.

I could create an empty folder structure which I could copy each time but we’re using an older CSV repository and new folders and files have to be created because of some strange reference or ID that it gives it and has trouble separating multiple copies of folders or files.
Another issue is that my Work Laptop is “admin restricted” so I don’t have permissions to install any program, but I can run scripts (just not powershell, unfortunately, because it is not activated) and Macros.

I’m not sure if it is possible at all but it would be a real time-saver just to create a new folder structure with a click of a button.

Cheers,
- Mestika

share|improve this question
    
Not a direct answer but the fact you've written vbs makes me think you can write vbs so you may be able to do VB? If so, creating a .NET solution for this would be really easy - you can also run it as a stand alone app meaning you don't need to install it. –  Dave Aug 14 '12 at 12:20

1 Answer 1

up vote 1 down vote accepted

Try this bat file (paste the code into notepad and save as a .bat file). The first line is a variable so change it to the root folder you want all to be created.

set rootDirectory = C:\Documents and Settings\username\Desktop\
cd %rootDirectory%
md test
md test\01

The above creates 1 folder on the desktop (called test) and then a subfolder called 01.

EDIT

In fact you don't even need the variable in this instance either (this does exactly the same, just with 1 line less code):

cd C:\Documents and Settings\username\Desktop\
md test
md test\01
share|improve this answer
    
Works perfect - thanks.. I just got one follow-up question. Is there anyway to set the RootDirectory to my current Directory / path?? –  Mestika Aug 15 '12 at 7:05
    
Just figure it out :-) Thanks again –  Mestika Aug 15 '12 at 7:31
    
I'm glad it worked for you. –  Dave Aug 15 '12 at 7:53

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.