Hi, suggestions:
(Without screenshots you will have people guessing and forced to generalise).
A folder name may appear differently in a Command Prompt compared to Windows File Explorer
due to how Windows handles file system metadata, specifically regarding
display names,
short names (8.3 format), and
localized language settings. File Explorer is a shell that often displays a "masked" or customized name, while the Command Prompt shows the actual name of the directory on the disk.
Here are the primary reasons for this discrepancy:
1. desktop.ini and Localized Names
File Explorer uses a hidden file named desktop.ini to customize the appearance of folders. This file can tell Explorer to display a different name than the one actually used in the filesystem.
- LocalizedResourceName: The desktop.ini file often contains a LocalizedResourceName entry, which translates the folder name (e.g., showing "Pictures" instead of "My Pictures").
- Result: Command Prompt shows the real folder name (e.g., C:\Users\Name\Pictures), while Explorer shows the localized or customized name.
2. 8.3 Short File Names
Windows generates short, compatibility-mode filenames (8.3 format) for long file or directory names to support older applications.
- Truncation: Long names are truncated and appended with a tilde and number (e.g., Program Files becomes PROGRA~1).
- Result: If you see PROGRA~1 in Command Prompt instead of Program Files, it is because the console is displaying the 8.3 short name rather than the long name.
3. Directory Junctions and Symlinks
Many "folders" in Windows are actually Directory Junctions (like links) rather than physical folders.
- Example: In many Windows versions, C:\Documents and Settings is a junction that points to C:\Users.
- Result: If you navigate to that location, command prompt might show the actual location, while File Explorer shows a specialized link icon and name.
4. Incorrect desktop.ini Inheritance
Sometimes, a desktop.ini file from a special system folder (like the Pictures or Desktop folder) is mistakenly copied or moved to a different folder.
- Result: That new folder will take on the name and icon settings of the original, appearing, for example, as "Pictures" in File Explorer even if the actual folder is named "Temp".
How to See the Real Name in Command Prompt
If you are confused by what you see in the Command Prompt, you can use these commands to find the true structure:
- dir /x: Lists files and folders, showing both the short (8.3) name and the long name.
- dir /ah: Shows hidden and system files (such as desktop.ini) to help identify why a name is being changed
How to Fix Incorrect Explorer Names
If File Explorer is displaying an incorrect name, you can usually fix it by deleting the desktop.ini file inside that folder.
- Open the folder in File Explorer.
- Enable View > Hidden items and uncheck Hide protected operating system files in the View tab options.
- Delete desktop.ini and restart Windows Explorer.
You'd need to examine your particular case(s) and determine which might apply.
Expansion on (1):
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...
superuser.com
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.