I'm using a German windows 7 and while I'm fine with that (otherwise I'd install an english version), I really dislike localized folder names - I'd like to see the true folder name.
Of course I could simply delete LocalizedResourceName from every single desktop.ini but I wonder if there's some registry setting that simply causes Windows to ignore the localized names.
3 Answers
- As a workaround, note that if you click in the address bar, the full non-translated path displays there
- In order to get rid of the
LocalizedResourceNameautomatically, install abash(e.g. from git) and runfor desktopini in $(find /c/Users -name desktop.ini); do sed -i "/^LocalizedResourceName/d" $desktopini; done
If you want to merely comment the entry for later reversal, use"s/^\(LocalizedResourceName\)/;\1/"instead of"/^LocalizedResourceName/d".
Of course you can modify the path/c/Usersto whatever path desired, just remember that msys/mingw uses forward slashes and not colon after the drive letter. - The might be a similar way using powershell, but I never bothered learning that since I use bash anyway... this SO post might yield a good start for the
sedpart. Or you just check this answer from a basically duplicate question - finally, note that
desktop.iniis completely ignored if a folder doesn't have either the system or readonly attribute set
Here's an alternative PowerShell approach to comment out the LocalizedResourceName statement in desktop.ini files:
$LRN = 'LocalizedResourceName'
gci desktop.ini -Hidden -Recurse -ea silent | ForEach{ $Content = Get-Content $_ -raw If ( $Content -match $LRN ) { $Content -replace $LRN, ";$LRN" | Set-Content $_ -force }
}To create an undo script, just swap the -replace parameters:
$Content -replace ";$LRN", $LRN 2 For anyone prefering the powershell way, this script worked for me:
$desktopinis = gci -Recurse -Hidden . | where { $_.Name -eq "desktop.ini" }
foreach ($ini in $desktopinis) { $content = $ini | get-content foreach ($line in $content) { if ($line -cmatch "^LocalizedResourceName=") { $newname = $line.substring(22) # propertyname plus one for the equals sign $before = $ini.Directory.FullName $after = $ini.Directory.Parent.FullName + "\" + $newname Write-Host ("Renaming '" + $before + "' to '" + $after + "'.") Move-Item -Path $before -Destination $after Remove-Item -Path ($after + "\desktop.ini") -Force } }
}It looks for desktop ini files recursively in the current folder and renames directories that contain them and where they contain a LocalizedResourceName to their shown name, then deletes the desktop ini file.
The output should be sufficient to revert what was done if anything goes sideways.
Without warranty.