View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12764 Members
Join this group to post and comment.
vishalhak
vishalhak • Dec 10, 2007

Help with DOS command

can any of you tell me how to perform any command on a directory or file that contains space in its name. eg: "cd ms office";where "ms office" is the name of the folder,the system returnts an error.:sshhh:
mahul
mahul • Dec 10, 2007
Re: help in dos!!!!!!!!!!!!!!

this is simple....just type the name of the command followed by the name of the file/directory in double quotes, e.g. cd "ms office". i have used this always in windows command prompt and this would work for dos too(though i didn't check this out). so try this and let me know.
Kaustubh Katdare
Kaustubh Katdare • Dec 10, 2007
Re: help in dos!!!!!!!!!!!!!!

I use a simpler method 😁 Let's say you want to switch to directory name "Hello World", type first few characters of the directory name and hit the tab key.

Note that this is just like what we have in bash. Those familiar with UNIX/SUN environment. 😀

-The Big K-
Prasad Ajinkya
Prasad Ajinkya • Dec 11, 2007
This does not work in the older versions of DOS.

Vishal, heres what you do - type in the first six characters of the string as if the space was not there, then type in "~1" after that.

So if you wanted to say .. change your directory to "My Documents", then you would say c:/>cd mydocu~1 (enter)

That should work!
vishalhak
vishalhak • Dec 11, 2007
thanks all of of you for your valuable sugesstions

Share this content on your social channels -