We have a Windows 2008 R2 file server sharing home folders for about 600 users. These folders are mapped to a shared drive for each user when they log in on their own workstations, and that mapped drive is in turn set as the default location in the Documents library in windows on everyone's profile, including the default profile on each of our machines. Log in to a new machine for the first time, and your Documents library will point at the file server. For laptop users, we also use the Offline Files feature, so that this follows them even when they're away from work.

My problem is that, looking at these folders on the server, they all show up in Explorer as "My Documents", instead of the actual folder name (set to match the username). How can I prevent Windows Explorer from doing this?


(From Spiceworks)

  1. Navigate to share eg \\Server\Users
  2. Right click on column SIZE
  3. Click on More at the bottom
  4. tick Filename

You then get an extra column showing the real filename. You could make this the default for folders by doing this.

  1. Press ALT
  2. choose Tools->Folder Options->View
  3. Click Apply to Folders

There's a much easier method, non-destructive, which targets the actual Desktop.ini entry responsible for this behaviour. Go to:

Group Policy -> User Configuration -> Preferences -> Windows Settings -> Ini Files

Create a new Ini File entry, with the following settings:

Action: Delete

File Path: %homeshare%\desktop.ini

Section Name: .ShellClassInfo

Property Name: LocalizedResourceName

MAKE SURE you enable Run in logged-on user's context under the Common tab.

This will remove the offending line from the user's desktop.ini folder, fixing the folder display name behaviour, and leaving everything else intact, including any other user-set folder view customisations, etc. No mess, no fuss.

  • Trying this now, but it will be some time before enough users execute the policy that I'll be able to see this working. Once I've seen the fix in action, I'll mark this accepted. – Joel Coel Oct 22 '15 at 13:42
  • Better than the inept and annoying methods listed by Microsoft, thanks. Accidentally wiped out a user directory once attempting to follow one of their recommended ways. – Fiasco Labs May 5 '16 at 5:23

This is Explorer interpreting the desktop.ini files located in each folder. It's maddening and unhelpful, and Microsoft recognizes that but gives no useful advice. The old "This behavior is by design" excuse for the loss...

I've taken to restructuring my shared directory hierarchies, on new installs, to be user-centric rather than directory-type-centric. Rather than having a hierarchy of "Documents" directories and "Profiles" directories (Desktop" directories, etc), I've taken to making a subdirectory for each user, and subdirectories below that for their various directories, like:

[ UserData ]
    |- [ Bob ]
    |     |
    |     | - [ AppData ]
    |     | - [ Desktop ]
    |     | - [ Documents ]
    |     | - [ Downloads ]
    |     | - [ Profile ]
    |     | - [ Profile.V2 ]
   ...   ...

I am really liking this method better tan the old way. I particularly like my provisioning script can set one ACL, at the "Bob" directory, versus one at each directory when they were stored in their own hierarchy. It also makes seeing an individual's total space usage much easier because I only need to du one directory.

My folder redirection policies need to change a little, as do the user profile paths (ending in %username%\Profile rather than just %username%), but it's a minor change. I've only been doing this for a few months but, so far, it has worked well.

  • Thanks for the response! I may go down this road eventually, but at the moment the Documents folder is the only folder redirected, meaning this solution would add an extra level of folders to look at. – Joel Coel Jan 10 '14 at 4:53

Deny yourself (or your security group) read access to the desktop.ini - Next time you refresh the folder, it will show the actual folder names, not "My Documents"

  • 2
    I can confirm that denying your self read access to the desktop.ini does indeed work. – Ryan Oct 20 '16 at 12:34

Just delete desktop.ini from all user folders (subdirectories of the share). I tested this, and it instantly displayed the proper name.

desktop.ini is hidden by default which makes it a little more tricky, but I can't see anything the users would miss with it gone; There is all of three lines of information in there.

Edit: To quickly blow away all desktop.ini files from the entire shared folder structure use the following command: (WARNING: This WILL remove user customizations for their folders, icons, layout settings? etc.)

      C:\Users\> del desktop.ini /s /a:h
  • 1
    Assuming users map to path\to\share\username, try: del path\to\share\*\desktop.ini /a:h Less destructive. This will get the desktop.ini out of each user's shared folder, but it doesn't recurse into subfolders. – Xalorous Oct 4 '16 at 15:19

To 'quick fix' this (this will instantly give them back their names, but if you do not set a new ini policy as suggested by Uthacalthing when a user logs in it will reform), use CMD or Powershell to either remove the desktop.ini file or rename it to something else.

foreach ($brokenDir in (Get-ChildItem "PATH\TO\HOMEFOLDERS" -Directory)) {
    $iniPath = "$($brokenDir.FullName)\desktop.ini"
    Rename-Item $iniPath ($iniPath.Replace('.ini','.ini.txt')) -Force

Add the column 'Filename' in explorer and you see the usernames

  • I don't know why this has been downvoted, because it is an interesting and easy workaround. Though it does not solve the problem, at least you can see the original name. – Luke Jun 9 '20 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.