• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 524
  • Last Modified:

create a directory which name contains spaces

Hi I am trying to create a batch file that would create a directory named Advanced Users, i know we can not use spaces but i am sure there is a way to bypass that, any ideas?
I am using
md "advanced users"
Thank you
0
abitoun
Asked:
abitoun
1 Solution
 
bradleys40Commented:
md "c:\yourpath\named users"
use quotes
0
 
bradleys40Commented:
sorry advanced not named
insert the quotes around the path
md "c:\yourpath\advanced users"
0
 
jwaldonCommented:
What exactly is not working or what kind of error is it giving you? I tried to duplicate your issue and it works fine for me.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Steve KnightIT ConsultancyCommented:
If you do

c:
cd \
md test
cd \test
md a long name with spaces in

You end up with

c:\test\a
c:\test\long
c:\test\name
c:\test\with
etc.

i.e. unless you add the quotes as suggested it will create each dir listed on the line.

I imagine that this is what the requestor was finding was happening

Steve
0
 
jwaldonCommented:
Well he included  quotes around the dir when he posted his question so I'm not sure about that.
0
 
abitounAuthor Commented:
Hi, Thank you to all that responded, I was missing a double quote!
0
 
bradleys40Commented:
i dont understand how the point were allocated here was there a problem or was I just wasting my time
0
 
W3a53735Commented:

If the OS is MSDOS with an LFN driver then ...
md advanced_users
then use a HEX disk editor, such as NORTON DISK DOCTOR to replace the
"_" with  " "

Probably not what you wanted.

What is the OS?

Steve....
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now