this is my first question here. I just revived an old pc to play dos games. I couldn't rename a folder, but I can rename files. Any idea why? Q2: How to see the full folder name in dir command? I see something like this : folderna~1 instead of foldername.
2 Answers
I'm sure you tried to use REN oldname newname to rename a folder.
The REN command is only for renaming files. In order to rename a folder, you have to use the MOVE command.
So you would want to use the following command:
MOVE oldfolder newfolderA bit counterintuitive, but that's how you have to do it in DOS or Command Prompt.
See also: Information about the MOVE command
As for names with ~1 and such, the old MS-DOS only had support for filenames with 8 characters and extensions with 3 characters or less.
A filename that has either 9 characters or more for its name, or 4 characters or more for the extension will automatically be renamed by systems that support longer filenames such as Windows to the first 6 characters of the filename, followed by a ~ and a number. If there's only one name, then its always ~1, but if two files or folders that share the same first 6 characters, then one of them will have ~1, the other will have ~2 and so on.
On old systems that only have short filenames, it is simply not possible to create files or folders with a longer name. For backwards compatibility, new implementation allows for both types. In Command Prompt, one can use Dir /x too see both the long and short filename/foldername. On old systems, you have to guess which is which.
If you are using an old DOS OS it might only support 8.3 names. Eight characters for the name and 3 for the extension. Thus names that are longer than 8.3 are shown as folderna~1
3