2

Up until Windows 7 I think (maybe XP?), a user profile was by default under C:\Documents and Settings\JoeUser\ , and in that folder you had My Documents, My Pictures and so on. Ok, good.

Now, in Windows 10, a user profile is by default under C:\Users\JoeUser\ , and in that folder you have Documents, Pictures and so on. Ok, fine.

However, in the folder tree of an Explorer window, within your "Desktop" entry on the left navigation bar, you get entries (= links) to "My Documents", "My Pictures", "My Music" and so on. If you try and press them - you get an error message, e.g.:

C:\Users\JoeUser\Documents\My Music is not accessible.

Access is denied.

My questions:

  1. Why are these tree entries even created? I certainly didn't do anything to make that happen.
  2. How can I make them disappear, if at all?
einpoklum
  • 10,666

2 Answers2

3

Why are these tree entries even created? I certainly didn't do anything to make that happen.

They are automatically created with every new user account, for compatibility with certain old software which doesn't use the "official" way of finding these folders and instead just has hardcoded locations.

(Yes there are many programs which assume the system disk is always called "C:", the OS is always installed into "C:\WINDOWS", the user profiles are at "C:\Documents and Settings", and so on.)

It also helps batch scripts, which don't have any decent access to full Win32 APIs and have no choice but to embed the paths statically.

The 'junctions' have ACLs set on them specifically so that they could be followed but not contents listed, so that programs which scan the entire directory tree won't end up looking at the same files twice. (Many XP-era programs did not test whether a directory is a junction, either.)

How can I make them disappear, if at all?

It should be possible to use rmdir on the junctions, after first granting yourself enough access.

  1. Clear the custom ACL entries on the link:

    icacls "My Documents" /l /reset
    

    ...or override just the ACL entry which currently denies access:

    icacls "My Documents" /l /grant Everyone:F
    
  2. Remove the link:

    rmdir "My Documents"
    

However, by default the links are hidden from view (using the regular "hidden" attribute). If you see them even though you don't have "Show hidden/system files" selected, you could instead hide the links using:

  1. Reapply the attributes:

    attrib /l +h +s "My Documents"
    
  2. Reapply the ACL:

    icacls "My Documents" /l /deny Everyone:(S,RD)
    

Note that 'takeown' or Administrator rights are unneeded, since you're already the links' owner.

grawity
  • 501,077
-1

These are profile directory its auto created when u login with a user name on the PC means you or someone have loged in with Joeuser unto your pc may be its your default user name

C:\Users\JoeUser\Documents\My Music is not accessible.

Access is denied.

Error is coming because you don't have user or owner rights or logged into the user or administrator account

To get rights login to administrator account then you can a access users account from there check the files or take backup of my documents desktop or you may losses data

If error still comes in administrator account then go to folder C:\Users\JoeUser

Right click take ownership

Then you can delete or copy or access folders and files