|
| |
Microsoft Conventions
The Tilde Convention
The tilde convention was established by
Microsoft for backwards compatibility with Windows 3.1 which could not deal with
long file names or file names with weird characters (such as spaces). Since
these old 16 bit programs (that we still use) can only deal with file names in
the 8.3 format (eight characters for the name plus a period plus three
characters for the extension) they developed the following strategy:
- If the file name does not fit into the 8.3 format, extract the first 6
characters and append "~1" to it. Thus "Program Files"
becomes "Progra~1". When running 32 bit software on NT, you can
either say "Progra~1" or "Program Files" and they are
exactly the same file (in this case, directory).
Note: In Win32, you might have to put the directory name in quotes if it
has spaces. For example
dir "C:\Program Files"
- But what if there is another file file named "Program Data"?
This is now called "Progra~2".
So how do you know what integer to put after the "~"? At the
console prompt, use the dir command to determine, by trial and error, which
directory it points to.
Example: What is the 8.3 path name for C:\Program Files\Microsoft Visual
Studio\VC98\Bin?
- At the console prompt, try dir
c:\Progra~1
- Assuming that works: now try dir
c:\Progra~1\Micros~1. Is
there a VC98 file there?
If so, then the 8.3 name is c:\Progra~1\Micros~1\VC98\Bin.
- If not, try try
dir c:\Progra~1\Micros~2. Is there a
VC98 file there?
If so, then the 8.3 name is c:\Progra~1\Micros~2\VC98\Bin.
- If not, try try dir
c:\Progra~1\Micros~3. Is there a
VC98 file there?
If so, then the 8.3 name is c:\Progra~1\Micros~3\VC98\Bin.
- If not, try try dir
c:\Progra~1\Micros~4. Is there a
VC98 file there?
Hopefully one of these will have the VC98 file there and you will
now know the correct file.
- Advantages
- Some programs, like the trial version of Oracle's database, cannot
deal with spaces in the file names and require this legacy approach (if
you want to install it into a directory that uses spaces in its name).
- The 8.3 format is shorter for putting in path variables.
- You don't have to put quotes around all of your file names when typing
them at the command prompt.
|