Help with DOS command

vishalhak
@vishalhak-B2sHVo Oct 13, 2024

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:

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • mahul

    @mahul-ZxpiLA 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

    @thebigk 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-aSUfhP 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-B2sHVo Dec 11, 2007

    thanks all of of you for your valuable sugesstions