20

I have a directory tree with nothing special (no network, no symlinks, no weird permissions...) except that certain folders are Subversion working copies managed with TortoiseSVN. I've been using it several years without any issue.

Right after physically moving the disk to a new computer (no idea if just a coincidence) I've discovered that I cannot rename those folders using the GUI (hit F2, type new name, enter). Windows Explorer doesn't complaint and reports the new name, but folder actually keeps the original name (which shows up when I click on location bar, in window title and in command-prompt).

It must be an Explorer glitch because I can finally make the rename from command line (rename foo bar) but I don't know what the root problem can be.

Any idea?

Álvaro González
  • 1,551
  • 2
  • 17
  • 30
  • Have you tried pressing F5 to refresh the folder? Renaming a folder to the same name will make explorer cancel its action, which would happen the 2nd time. – LPChip Nov 21 '16 at 09:57
  • 1
    @LPChip Sure, I hit F5 until I almost sink the key. And I restarted twice. And I removed the internal `.svn` directory. Finally I've just searched and removed all the `desktop.ini` files in the directory tree and problem seems gone... – Álvaro González Nov 21 '16 at 10:03
  • Just a quick reminder: since it has now been more than two days since you posted your own solution to the problem, you can mark that as the officially accepted answer. Thanks for your contribution! – Run5k Nov 28 '16 at 00:48
  • see also https://superuser.com/questions/381110/windows-explorer-sees-different-file-name-from-cmd – hello_earth Aug 04 '20 at 11:06

1 Answers1

28

I eventually searched for all desktop.ini files in my directory tree and removed them all. The issue got fixed instantly:

  • Folders finally showed their actual name
  • New renames actually happened at file system level

Such files contained entries like this:

[.ShellClassInfo]
LocalizedResourceName=This is the new name

... that seems to be a feature rather than a bug:

LocalizedResourceName

Specifies a resource module and the string ID to use as the name of the folder to display when viewed using the File Explorer or the Shell.

I don't have the faintest idea of how Windows ever came to the conclusion that I wanted to translate the folder rather than renaming it.

Álvaro González
  • 1,551
  • 2
  • 17
  • 30
  • 3
    As a possible cause: have you installed a localised language pack? For example, I bought a computer in Stockholm with Swedish installed, but I want to use it in English, so I installed the language pack from Microsoft. Or perhaps you've switched locales between enUS and enUK, or similar. Deleting the desktop.ini files will simply force the OS to regenerate them based on an examination of the folder structure and contents; brute-force, but effective. – flith Nov 21 '16 at 13:21
  • @flith It's a Spanish edition but I haven't installed additional languages. – Álvaro González Nov 21 '16 at 15:04
  • 2
    Are you sure it isn't actually in English, and the local reseller has put the Spanish pack over the top? That might explain it. – flith Nov 21 '16 at 15:08
  • 1
    @flith Spanish is the only language listed ([screenshot](https://i.imgur.com/Kk1c1pY.png)) but cannot be removed. No idea of what that means exactly. – Álvaro González Nov 21 '16 at 15:16
  • 1
    Interesting note: Windows also uses this for "special" folders like desktop, my music and so on, which explains why on Windows 7 the My Music folder is actually `%userprofile%\Music`. – svbnet Nov 27 '16 at 10:14
  • If you use any non-English languages then obviously it's already a localized version. Windows folders and files have English names and the non-English names are specified by desktop.ini – phuclv Apr 15 '20 at 00:54