Prevent Windows Explorer to use "LocalizedResourceName" when renaming fichier or dossier from Recherche result

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Prevent Windows Explorer to use "LocalizedResourceName" when renaming fichier or dossier from Recherche result

Message par ForumBot »

Maybe c'est seulement on localized version of Windows, I ne know.

Si vous rename a dossier while in a Windows Search result window, à la place of renaming the fichier, it will créez un `desktop.ini` fichier and ajoutez un `LocalizedResourceName` variable avec the nouveau name à la place.

As a result, there sera a discrepancy entre the real dossier name and the displayed dossier name in Windows Explorer.

I spent hours tonight trying to find a solution, and ensuite trying to supprimer desktop.ini fichiers in a specific dossier recursively sans success.

So, ici I am, asking for help. Is this a bug or not ?!

- Existe-t-il un moyen de prevent Windows Explorer to edit le bureau.ini fichier and rather rename the actual filename ?

- If c'est a bug, why ne peut pas I find more people complaining about it ? Is there quelque chose wrong avec the machine I get this problème on ? And if so, comment troubleshoot this ?

- Comment get rid of desktop.ini fichiers as a workaround ? J'ai essayé Powershell, J'ai essayé Unlocker and LockHunter. J'ai essayé the many things including `del /f /s` command. Tout fails parce que Windows is protecting these système fichiers.

Notez que dans le past, sur le same machine, and on Windows 10, J'ai essayé de fix this looking après Windows Search. Sans success. I even ended up moving the index fichiers and trying different set of autorisations. Could it be related ? (Why ?!)

Hope quelqu'un can help. This drove me really mad.
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Prevent Windows Explorer to use "LocalizedResourceName" when renaming fichier or dossier from Recherche result

Message par ForumBot »

I ***am*** seeing the behavior the OP describes.

-

Test dossier avec two subfolders:

-

Rename #1 via fichier dossier:

-

Result of step #2:

-

Search: `kind:Folder`:

-

Rename #2

-

Result of step #5 (note the attribute change and unchanged fichier système dossier):

-

Contents of `desktop.ini` in #2:

```
[.ShellClassInfo]
LocalizedResourceName=Ordinary Folder II -Renamed

```

As I (and seemingly others) were unaware of this behavior, Je ne sais pas of any fix". The workaround suggested by @John, exiting search avant renaming, seems the best short-term bet.

Vous n'avez pas need to supprimez le `desktop.ini` fichiers to have the dossiers display their filesytem names, clearing the `ReadOnly` attribute for the dossier will prevent processing du `desktop.ini` fichier. This **PowerShell** snippet will recursively clear the attribute for any dossier that contains a `desktop.ini` fichier (starting avec the current fonctionnel répertoire):

```
gci desktop.ini -Recurse -Force | ForEach{
$folder = Get-Item $_.DirectoryName
$folder.Attributes = $folder.Attributes -band -not [IO.FileAttributes]::ReadOnly
}

```

And this will définissez le attribure for same:

```
gci desktop.ini -Recurse -Force | ForEach{
$folder = Get-Item $_.DirectoryName
$folder.Attributes = $folder.Attributes -bor [IO.FileAttributes]::ReadOnly
}

```
Répondre

Revenir à « Windows 11 »