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.

I tried using at first a combination of xcopy and del, but del kept failing.

xcopy creates directory if it doesn't yet exist.

The other option is to use MKDIR but it does not work inside a batch file?

MKDIR "C:\stuff"

Any ideas why this is not working inside .bat/.cmd file??

It works fine from a command prompt.

share|improve this question
1  
What error do you get? –  Paul Jul 26 '13 at 3:13
    
Provide real example so we can reproduce the problem. –  Vlastimil Ovčáčík Jul 26 '13 at 6:13

2 Answers 2

Try using md instead of mkdir

md "c:\stuff"

This ha always worked for me.

share|improve this answer

In Windows Vista, 7, and 8, there is a feature called User Account Control. To make a new folder in just any location, you need to be running an "elevated command prompt," which is running Command Prompt as an administrator.

share|improve this answer

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.