Jump to content

Using Bat How to create Folders...


suryatry26

Recommended Posts

how to create the folders with name.

i need to create one new folder with "Testing" name.And inside of that Testing folder i need to create "Done" & "Query" (2 Folders)using Bat.is it possible?

Link to comment
Share on other sites

You will need to use the DOS command MD (Make Directory). Don't forget that should add a structure one level at a time. Use quotes for path if you want to include spaces.

MD "C:\Testing"
MD "C:\Testing\Done"

Link to comment
Share on other sites

MSasu working great.. I need without path. this folder need to create with Bat file available path. so where ever I want I can easily copy this bat and I can create the folders.

Link to comment
Share on other sites

I need without path

This will create the structure of folders in current location (that it, where BAT file is executed):

MD "Testing"
MD "Testing\Done"

Link to comment
Share on other sites

Here is another example we make around 10 work directories in one go just repeating the lines, you can run the .bat with variables MDP jobno worker this would be in BAT file %1 is jobno, %2 is worker. MD %1 CD %1 MD %2.

 

p:
cd\
md 2013150
cd 2013150
md Design
md Letters
md Survey
md Photos
md DBYD
cd DBYD
md Telstra
md Powercor
md Gas
md others
cd P:\
repeat above now.......

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...