When I tried to rename a file(the extension was some random text, Windows Disk Check caused it) in Windows Explorer, it told me that there's another file with the same name in the same location, as in the image below,

And the prompt windows made me is as follows,

It is clear from the images that the file Windows mentions about having the same name doesn't have the same name as the file being renamed.
What's happening here?
This usually happens after I run a Check Disk on a removable drive, windows messes up the file names and their extensions.
What is happening here?
Why does windows change my file names and their extensions?
How can I restore the original file name?
- 3,831
1 Answers
Ultimately, I think that this is a simple misunderstanding in terminology. The file names that you see similar to IMG_20~1.JP0 are in the legacy 8.3 format utilized for backwards compatibility purposes:
Windows truncates the file name, if necessary, to six characters and appends a tilde (~) and a digit. For example, each unique file name created ends with "~1." Duplicate file names end with "~2," "~3," and so on.
(Source: How Windows Generates 8.3 File Names from Long File Names)
In other words, every file name potentially has an 8.3 format equivalent. You can display all of them within any given folder by navigating there in a command prompt window and executing the dir /x command. However, although you wouldn't see it within that particular view, the files still maintain their longer (or modern) file names behind the scenes.
Your external drive may have some type of disk integrity problem that is causing the operating system to ask you to run CHKDSK so often. Essentially, during the CHKDSK process it is encountering problems that are creating full and/or partial duplicates of some of your files, displaying them in the legacy 8.3 format, and changing the file type from JPG to JP0, JP1, etc., to avoid conflict with the original file. But remember that "behind the scenes," the file you see with an 8.3 file name (such as IMG_20~1.JP0) still has a longer file name. This is revealed when you attempt to change the file type from JP0 to JPG: the legacy 8.3 file has an unseen full-length file name identical to your original JPG file, so when you try to change it to a JPG extension it tells you that file name already exists.
The bottom line is as follows: you are seeing two different visual representations of the same file name, one shown in the legacy 8.3 format, while the other is displayed in the modern long file name format. They can coexist within the same folder because they have different file extensions, but when you try to change that legacy file's extension to match that of the longer file name, the operating system correctly tells you that it already exists.
The root cause of this problem appears to be your external hard drive. The drive's file system has some issues, or the hardware has problems… perhaps even both. But hopefully I have helped clear up the mystery behind "There is already a file with the same name in this location."
- 16,463
- 24
- 53
- 67