August 3rd, 2004, 00:23 AM
dos 8.3 filenames (short form) in winXP
I have deleted files using the cmd prompt before, but it was so long ago I've forgotten something. It's about opening up directories (or specifying files, either way) whose first 6 characters include a space.
For instance, I know how to open a directory called 'Windows'; I just type:
and it opens, because DOS 8.3 file naming only looks for the first 6 characters, after which you type ~1 and it 'guesses' the rest.
Equally, if I type:
it opens too. This means I can open a file/folder with a long name, just by typing the first 6 characters, followed by "~1".
But if I have a directory called 'Other Windows', I can't do this so easily:
doesn't work, because the directory is called 'Other Windows'
cd Other ~1 doesn't work either, because the space I put in messes it up: "Too many parameters - ~1";
cd Other_~1 work, because the name doesn't include an underscore.
So how do I open it? Basically, how do I get windows command prompt (/dos shell) to recognise files/folders whose names contain a space in the first 6 characters? I know you can do it, and this must be an obvious question for anyone who's used DOS, but I have really forgotten how to do it.
Hope you can help,
August 3rd, 2004, 09:36 AM
Leave out the space, i.e. 'Other windows' becomes otherw~1 in DOS 8.3 form.
Last edited by Nikto; August 3rd, 2004 at 09:54 AM.
August 3rd, 2004, 16:20 PM
Nice job Nikto, I always get mixed up on commands where there's a space or no space.
August 3rd, 2004, 22:35 PM
Thanks very much Nikto! I knew it would be something simple.
April 26th, 2005, 18:49 PM
You can find out the 8.3 file name that corresponds to a long file name by using DIR /x in the cmd window open to the folder in which the item resides. The second column then contains the 8.3 file name.