New
#21
Great info, thanks!
Ah, that one's here now: https://docs.microsoft.com/en-us/win...symbolic-links
Bree,
Thanks. These days, if I want to save a webpage for my notes, I both print the page to pdf and save a url to it.
I've tidied up my long spiel - My tuppence worth on the previous page & put in the MSDocs links.
Denis
The items that you have listed (My music, My Pictures, and My Videos, in later versions simply called Music, Pictures, and Videos) are actually a little bit different than your standard symbolic links although they make use of the same concepts.
Microsoft refers to these as "Libraries". The cool thing is that you can add folders from many different locations and they will all appear in the library as though they were in one location.
As an example, you could could folders such as "C:\My Saved Videos", "E:\My Downloaded Videos", "D:\Project\Sep 2019\Video Assets" to your videos library and the contents of all those locations would appear as though they were one location.
You can create your own libraries or customize the ones that are already present.
There are quite a few tutorials related to Libraries here on TenForums. Rather than attempt to link to all of them here, simply search on "Libraries" and you will find them.
My apologies. The original post was about My music, My Pictures, and My Videos which ARE libraries.
Those just happen to be the same words. Not every use of the words "My Music" is about a library.
This thread has not been about libraries at any stage.
Denis
As others have noted, they are junctions that exist for the sake of backwrds compatibility:
The fact that they can't be viewed in Explorer is simpply a matter of permissions:Code:C:\Users\keith\Documents>dir /al Directory of C:\Users\keith\Documents 07/19/2019 07:51 PM <JUNCTION> My Music [C:\Users\keith\Music] 07/19/2019 07:51 PM <JUNCTION> My Pictures [C:\Users\keith\Pictures] 07/19/2019 07:51 PM <JUNCTION> My Videos [C:\Users\keith\Videos] 0 File(s) 0 bytes 3 Dir(s) 672,654,389,248 bytes free C:\>dir /al Directory of C:\ 02/19/2018 01:08 PM <JUNCTION> Documents and Settings [C:\Users] 0 File(s) 0 bytes 1 Dir(s) 672,651,902,976 bytes free C:\Users\keith>dir /al Directory of C:\Users\keith 07/19/2019 07:51 PM <JUNCTION> Application Data [C:\Users\keith\AppData\Roaming] 07/19/2019 07:51 PM <JUNCTION> Cookies [C:\Users\keith\AppData\Local\Microsoft\Windows\INetCookies] 07/19/2019 07:51 PM <JUNCTION> Local Settings [C:\Users\keith\AppData\Local] 07/19/2019 07:51 PM <JUNCTION> My Documents [C:\Users\keith\Documents] 07/19/2019 07:51 PM <JUNCTION> NetHood [C:\Users\keith\AppData\Roaming\Microsoft\Windows\Network Shortcuts] 09/14/2019 01:51 AM <DIR> OneDrive 07/19/2019 07:51 PM <JUNCTION> PrintHood [C:\Users\keith\AppData\Roaming\Microsoft\Windows\Printer Shortcuts] 07/19/2019 07:51 PM <JUNCTION> Recent [C:\Users\keith\AppData\Roaming\Microsoft\Windows\Recent] 07/19/2019 07:51 PM <JUNCTION> SendTo [C:\Users\keith\AppData\Roaming\Microsoft\Windows\SendTo] 07/19/2019 07:51 PM <JUNCTION> Start Menu [C:\Users\keith\AppData\Roaming\Microsoft\Windows\Start Menu] 07/19/2019 07:51 PM <JUNCTION> Templates [C:\Users\keith\AppData\Roaming\Microsoft\Windows\Templates] 04/30/2019 11:48 AM <JUNCTION> TESTJUN [\??\C:\users\keith\documents\recipes] 0 File(s) 0 bytes 12 Dir(s) 672,651,882,496 bytes free
If you check your effective permissions, you'll see that while you are denied List/Read permission, you still have permission to Traverse the folder:
So, if you type/paste c:\Documents and Settings into the Explorer Address bar, you'll get an Access denied error, but if you type/paste c:\Documents and Settings\Public, it will open your Public folder. Likewise, you can access any valid item within your Music folder with a path like c:\Documents and Settings\Keith\My Documents\My Music\Abba:
It's this behavior that makes them useful to older software.
Keith
I realize that this is an "old" thread, but this thread is the reason I decided to "Join"...
This thread has been quite enlightening, since I was experiencing a lot of the same problems trying to figure out where "My Videos" and "My Music" went to. They show up under C:\Users\<Username>\Music and C:\Users\<Username>Videos
Nothing showed up for "My Videos" or "My Music" under C:\Users\<Username>\Documents but thanks to this thread I found that both directories are not only "Hidden" but also "System" files.
My original problem came up during my backup script using "robocopy". So I backed up C:\Users\<Username>\Music and C:\Users\<Username>\Videos (so far, so good), but then I also backed up C:\Users\<Username>\Documents. That's where the problem came in because I not only got all my "Documents" directory files and folders, but also got another copy of all "My Music" and "My Videos".
Apparently, even though I couldn't see those links until I looked at Hidden and System files, and got the same authority error (as one of the above posts) when I tried to go into those directories, somehow "robocopy" was able to copy them and doubled up all my rather large "Pictures" and "Videos" directory files on my external backup drive.
I did find out that "My Videos" and "My Music" are <JUNCTION> files under C:\Users\<Username>\Documents so I can now see why that happened:
I used "dir" from a regular "Administrator: Command Prompt" window on the C:\Users\<Username>\Documents directory. From "dir /?" I figured out that I needed to run "dir /A:HS" to see Hidden and System files. And there they were - both "My Videos" and "My Music"! Listed as type <JUNCTION> and showing me what they were "pointing" to: C:\Users\<Username>\Videos and C:\Users\<Username>\Music. Looks like "My Pictures" is set up the same way.
So for now I'm going to remove C:\Users\<Username>\Music and Videos from my robocopy commands and let Windows do its thing to grab those directories through the <JUNCTION> names in C:\Users\<Username>\Documents when I back up "Documents".
I could just grab the files from where they really are, but then I'd have to "exclude" the "My Videos" and "My Music" directories when I back up C:\Users\<Username>\Documents. Very odd that even after viewing Hidden and System files I wasn't authorized to get into those "My Videos" and "My Music" directories, but somehow "robocopy" was able to copy them just fine...
I'm hoping this doesn't change for a while now, or I'll have to rework my backup scripts again. At least now I know what I need to clean up on my external hard drive backup which now has the "real" files in both locations (it didn't know it was copying from a <JUNCTION> file). Happy for now!
Welcome to Ten Forums.
An old thread, but as relevant today as it was when MS first rearranged the layout of user folders in Vista, and those junctions appeared to provide backward compatibility for the old XP locations.
So did mine. I have a backup script too. Originally I used XCopy, but I have developed it over the years, switching to using Robocopy....My original problem came up during my backup script using "robocopy"...
My problem was that Robocopy would copy the junction as if it is a folder and will create a corresponding folder in the destination. And if the folder the junction points to also contains junction points it may lead to a path that loops to infinity, or at least until the maximum path length is exceeded for the destination.
The cure was to add the /XJD option to the command line. This tells Robocopy to exclude junctions, as 'robocopy /?' will tell you.
/XJD :: eXclude Junction points and symbolic links for Directories.