Thursday, September 21, 2006
Sometimes when using the older DOS COMMAND file Windows XP will list the long file names but COMMAND only recognizes the shortened file name for actions like deleting or moving.
Have you ever wondered what rules Dos uses to convert the long file names to its shortened 8.3 version?
Windows 2000 and XP allows users to use long file names up to 255 characters in length as well as a three character extension without losing backwards compatibility with existing DOS volumes.
Because of the backwards compatibility, long file names are converted to the original 8.3 character naming convention using the following rules.
1. The extended characters + , ; = [ and ] are converted to underscores ( _ ).
2. The first three characters after a period become the extension.
3. Spaces are ignored.
4. The first six characters now remaining are converted to uppercase.
5. The last two characters after the first six become “~1” . If another file exists with the same first six characters and ~1, the file name will be converted to “~2”; this process will continue. In the event you have more than 9 files with the same first 9 characters, the tenth file becomes ~10, utilizing the last three characters.
Microsoft does not allow certain special characters in file names of any sort. These are:
/ \ : * ? “ < > |
Using these rules, a long file name or directory such as “App for Audio Testing” would require the user to use the DOS equivalent “appfor~1”
