Solved Foldername differs between File Explorer and CMD


Kan Lang

Well-known member
Local time
6:15 PM
Posts
29
OS
Windows 10
Hi, got this somewhat strange phenomenon: a foldername under File Explorer (Win11 25H2 fully patched) is different from it’s name in a CMD prompt (and in Wiztree and Everything for that matter). Ran chkdsk, no problems. What could be the cause? Thanks in advance, regards, Kan
 
Windows Build/Version
25H2

My Computer

System One

  • OS
    Windows 10
    Computer type
    Laptop
Is is the user profile name? This can be expected behavior if the account is later signed in as a microsoft account.

If not, view hidden files, delete the desktop ini file in the main location and then restart
 

My Computers

System One System Two

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom Built
    CPU
    Ryzen 7 5700 X3D
    Motherboard
    MSI MPG B550 GAMING PLUS
    Memory
    64 GB DDR4 3600mhz Gskill Ripjaws V
    Graphics Card(s)
    RTX 4070 Super , 12GB VRAM Asus EVO Overclock
    Monitor(s) Displays
    Gigabyte M27Q (rev. 2.0) 2560 x 1440 @ 170hz HDR
    Hard Drives
    2TB Samsung nvme ssd
    4TB Western Digital nvme ssd
    PSU
    CORSAIR RMx SHIFT Series™ RM750x 80 PLUS Gold Fully Modular ATX Power Supply
    Case
    CORSAIR 3500X ARGB Mid-Tower ATX PC Case – Black
    Cooling
    ID-COOLING FROSTFLOW X 240 CPU Water Cooler
    Keyboard
    Logitech G213
    Mouse
    Logitech G203
    Internet Speed
    1.2gbps Fiber 😎
  • Operating System
    Chrome OS
    Computer type
    Laptop
    Manufacturer/Model
    HP Chromebook
    CPU
    Intel Pentium Quad Core
    Memory
    4GB LPDDR4
    Monitor(s) Displays
    14 Inch HD SVA anti glare micro edge display
    Hard Drives
    64 GB emmc
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.
  1. Open the folder in File Explorer.
  2. Enable View > Hidden items and uncheck Hide protected operating system files in the View tab options.
  3. Delete desktop.ini and restart Windows Explorer.

You'd need to examine your particular case(s) and determine which might apply.

Expansion on (1):

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.
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo t480s
    CPU
    i7-8650U
    Memory
    16GB
    Graphics Card(s)
    Intel UHD 620
    Screen Resolution
    1920x1080
    Hard Drives
    C SN810 SDCPNRY-512G-1006
    Browser
    Edge, Firefox
    Antivirus
    Defender
a foldername under File Explorer (Win11 25H2 fully patched) is different from it’s name in a CMD prompt
Please post examples so the issue can be addressed.


Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 25H2 Build 26200.8037
Hi all, thanks for the extensive replies! Greatly appreciated and learned quite a few things because of them. What happened in my case was indeed an ‘desktop.ini’ issue: the directory name was ‘videos’, a directory I had moved from an older Windows-system and renamed. The foldername I had given and that showed in File Explorer was ‘video box’.

Well, problem solved. Thanks for the help!

Ps: will post pics next time I have a problem.
 

My Computer

System One

  • OS
    Windows 10
    Computer type
    Laptop

Latest Support Threads

Back
Top Bottom