Computer Hope

Microsoft => Microsoft DOS => Topic started by: mccsue on June 20, 2004, 06:27:35 PM

Title: ~ symbol in DOS
Post by: mccsue on June 20, 2004, 06:27:35 PM
I'm trying to start my computer up in DOS (Windows 2000) and one of the commands is
cd progra~1
I keep getting "invalid command".
Can you tell me how to make  "~" so DOS will read it?
I've tried Shift  ~ . Any ideas?
Title: Re: ~ symbol in DOS
Post by: mad1mike on June 21, 2004, 03:07:18 PM
DOS cannot read file names of more than 8 characters and uses the "tilde" to indicate a longer file name. As your first command is Change Directory (CD) DOS cannot execute as you are trying to access a directory with an invalid file name (too long).
Rename directory with 8 or less characters.

hope this helps
Title: Re: ~ symbol in DOS
Post by: MalikTous on June 22, 2004, 04:46:20 AM
Try this:

cd "program files"

As long as you are starting in C:\, this should work. If you aren't sure where you start from (or if you start from C:\Windows, for example), use:

cd "\program files"

The "quotes" force DOS to look up the 8.3 filename from the extended attributes table.

You are aware that you are using 'emulated' DOS in NT5/2K...