Make Multiple Directories in Windows From Batch File – Education Career Blog

I would like to change the following batch file to use spaces instead of underscores. However, when I do that the directories come out weird. I’ve tried using quotation marks, but they come out wrong.

md Sample_sample
md Sample_sample\sample
md Sample_sample\sample2
md Sample_sample3
md Sample_sample2
md Sample_sample\sample\sample

PS. This is for the purposes of building a folder structure in GroupWise in a proxy folder so files can be archived from multiple accounts. If anybody know’s how to make a large number of folders as above in GroupWise 7.0 on a proxy account and in a corporate security environment please let me know.


Using double quotes works fine. Tested on Windows 7:

md "Special Dietary Foods\Infant Formula and Food"

Leave a Comment