CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: DOS question

  1. #1
    Join Date
    Aug 2002
    Location
    BC, Canada
    Posts
    116

    DOS question

    Hi,

    I have a silly question: in the DOS prompt, I am typing

    > cd Program Files

    to go to the Program Files folder.

    but because there is a space in the directory name, dos has a problem.

    How can I fix this?

    Thanks!

  2. #2
    Join Date
    Nov 1999
    Location
    Copenhagen, Denmark
    Posts
    265
    Try

    cd "Program Files"

    or if there are no other folders starting with program you might try:

    cd Program*

    rgds,
    S. Bro
    Best regards,
    S. Bro

    "I would be happy to deal with my problems one at the time if they would only line up!"
    -Paul Cilwa, "Borland C++ Insider".

    Other useful fora some of which I ruthlessly clipboarded from other peoples footers.

    MSDN: http://search.microsoft.com/us/dev/default.asp
    WIN 32 Assembler: http://board.win32asmcommunity.net/
    RDBMS: http://www.dbforums.com
    Robert's Perl Tutorial: http://www.sthomas.net/roberts-perl-tutorial.htm
    Merriam-Webster Online: http://www.m-w.com/home.htm
    Writing Unmaintainable Code: http://mindprod.com/unmain.html

  3. #3
    Join Date
    Aug 2002
    Location
    BC, Canada
    Posts
    116
    Thanks!

  4. #4
    Join Date
    Jun 2002
    Location
    Letchworth, UK
    Posts
    1,020
    cd Program*

    only works on NT/2K/XP. Doesn't work on 95/98/ME

    If Program Files is the first directory with Progra... created, you could also use

    cd Progra~1
    Succinct is verbose for terse

  5. #5
    Join Date
    May 2000
    Location
    Phoenix, AZ [USA]
    Posts
    1,347
    You can use dir /x to obtain the 8.3 format directory name and
    then cd into that directory.

    --Paul

  6. #6
    Join Date
    Sep 2000
    Location
    Russia
    Posts
    262
    cd Program* will only work with cmd command processor. The default old command will neither work on NT/2K/XP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured