Windows 7 – Different File Names in Explorer and CMD

command linefilenameswindows 7windows-explorer

I just got a new computer, and put my old hard drive (which contained Windows) in the new computer to keep my old files. I was successfully able to remove the Windows directory from this drive, but I'm having some trouble here. I am using Windows 7.
Basically Windows Explorer seems to see different file names compared to cmd. And the file names seen in windows explorer don't actually work (i.e. if I try to install something to a folder, it has to be installed to the foldername shown in cmd).
The only way to rename them properly, is through cmd, but even then Windows Explorer doesn't see the change.

What is going on here? And how can I fix it?

Best Answer

Windows Explorer isn't the old DOS+Windows File Manager. Folders are not directories.

Given the marked difference between the Recycle Bin as it exists in the filesystem and how it looks in Explorer, it's surprising how often people have to be reminded of this fact. Folders are not directories. Explorer doesn't show an unadulterated view of what's in one's filesystem. Rather, directories are (one of) the underlying storage system(s) for what Explorer shows as a folder.

This is not solely the case for special folders and virtual folders, either, as is again surprisingly widely believed. Whenever a directory is marked with the read-only attribute, Explorer displays it according to what's specified in the desktop.ini file in that directory. The desktop.ini tells Explorer what kind of folder the directory holds the backing storage for.

One of the most basic things that desktop.ini tells Explorer is what the name of the folder is. It does this through the LocalizedResourceName value in the .ShellClassInfo key in the desktop.ini file, which provides the number of the name to use in a table built into a DLL. Your old \Program Files (x86)\desktop.ini contains such a name.

Delete, rename, edit, or otherwise adjust the desktop.ini files in these old directories.

Further reading

Related Question