TechJunkie is a BOX20 Media Company

Home Web Easily Create Nested Directories Using MkDir

Easily Create Nested Directories Using MkDir

Creating nested directories using Windows Explorer can be quite tedious. First you have to create the master folder, open it and then create the sub-folder, open it then create another sub-folder… you get the idea. As a quicker alternative, you can use the “MkDir” command line tool to easily create the entire folder structure with a single command.

For example, the command:

MkDir “C:\test1\test2\test3”

Would create “C:\test1” if it did not exist and then create “C:\test1\test2” if it did not exist and finally create “C:\test1\test2\test3” if it did not exist.

This command can definitely come in handy in the event you have to create folder structures quickly. Combine this with the use of the up arrow/OS keys functionality in the command prompt to cycle through the previous commands and you can really save yourself some time.

How To Auto-Launch a Private Session in IE, Firefox or Chrome

Read Next 

2 thoughts on “Easily Create Nested Directories Using MkDir”

Adam says:
Nice tip. You can do the same thing in a linux environment, you just need the “-p” option.”mkdir -p test1/test2/test3″ would create the three subdirs directly under your current dir.
Charley_EntrepreNerd says:
On my USB i carry a batch file for just this task, named techfolders.bat:cd /d C: && mkdir Tech && cd Tech && mkdir Apps “Backups/ccleaner backups” Drivers && exit Copy and paste into notepad and “save as” (ensure all files selected) with the format of: name.batThe && conjoins multiple commands together; and this can also be run from a Start -> Run box [keyboard shortcut Windows key + R] with the addtion of cmd /c prior to the string, “cmd” launches the CLI (Command Line Interface) “DOS BOX” and /c switch ensures the CLI Box closes gracefully when command completed. and here is my current favorite CMD string to enter at the run box, parses the information without the IP6 and toredo info: cmd /k ipconfig /all | find “Default Gateway”

Leave a Reply

Your email address will not be published. Required fields are marked *


Adam

Aug 8, 2010

643 Articles Published

More