Thursday, September 21, 2006
How to Interpret Shortened Windows XP Filenames in DOS
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”
Wednesday, September 20, 2006
How to Delete AVI Video Files that Crash Windows Explorer
Here are two common symptions with certain video files that crash explorer and my cure.
You’ve downloaded a video file and now whenever you view the file in Thumbnail view with Windows Explorer, Explorer explodes, as in crashes leaving an error message stating the app has closed in it’s wake.
Alternatively, if you are viewing the file in list view everything seems fine until you click on the file or try to play it. Same crash result.
You can’t delete it in Exploder, er Explorer because as soon as the file is selected, CRASH!
What to do? What to do?
The easiest way I have found is to head into the DOS netherworld via the command window. Surfing around, I discovered other methods by deleting registry keys but if going into the registry makes you nervous like it does me, try the following.
Access command by going Start/Run… and type “cmd”.
OR if you prefer the long way or just want to know where to get to it via the menus. Go to Start/All Programs/Accessories/Command Prompt.
In DOS go to the directory where the file is kept and simply delete it with DOS delete or erase.
CMD displays long file names and you will need to put all files to be erased in quotes.
For those of you unfamiliar with arcane DOS commands, here are a few basics that will get you through what you need to do here.
At the prompt, typing the following will give the results indicated.
cd “directory name" changes to the directory name
D: changes to drive letter where D is the drive letter
dir gives directory listing
del “file name" deletes file name
erase “file name" same as del
exit closes window and quits program
For more dos commands try here.
NOTE:The COMMAND application will not work here! COMMAND.COM is included for backwards compatibility and is recommended for use only when old MS-DOS programs may not be able to be run otherwise.
When a user is using COMMAND they will need to use the short 8.3 file name and with long file names it is not worth figuring out what COMMAND may name them.
Change Property Settings in Windows XP CMD
Even if you are a semi literate Windows user you will find occasion to stumble into the dark and unfamiliar alleyway that is DOS.
To manually delete an .AVI video file that crashes Windows Explorer for instance; the command line is probably the easiest way do it without messing in the registry.
The default settings for the CMD DOS window however may not be to your liking. The screen is not wide enough to view long file names, the font is anitquated and maybe you don’t like the imposing black background.
Windows XP provides a quick way to change any of those settings and more. Simply left or right click the C prompt icon on the top left corner of the CMD window and choose “Properties” to access a tabbed window full of settings. Screen width is the first one I usually change.
