Junctions, Libraries for multiple drives, and search questions


  1. Posts : 10
    Windows 10 Home
       #1

    Junctions, Libraries for multiple drives, and search questions


    My system has a secondary drive (E:, with the main Public folders on it, and I use Libraries to access it. Under Libraries\Documents, there are 2 folders: My Documents points to C:\Users\bbon\Documents, and Documents points to E:\Users\Public\Document. In the process of accomplishing this, I removed the Public\Documents folder from C: and then created a "Directory Junction" from C:\Users\Public\Documents to E:\Users\Public\Documents with mklink /J .
    Attachment has my notes for how I did this.

    One disadvantage of doing what I did is that it is difficult to tell where a file is stored. I believe the files are actually stored on E:, but File Explorer displays the same thing whether I navigate to C:\Users\Public\Documents or E:\Users\Public\Documents. Doing a Properties on a file from the C: folder shows it as being located on the C: drive, and doing Properties on the identical file from the D: folder shows it as being located on the E: drive, with all listed attributes other than location identical. I believe it is doing what I intended, but I don't know how to verify it.

    Questions: How can I verify if a folder is a physical folder or a link? When I do Properties on C:, is it safe to assume that the Used Space is actual space on the C: drive, or does it count space used in the Public\Documents folder that is actually on the E: drive?

    This is also screwing up file searches from File Explorer. Trying to get it working right, yesterday I reindexed everything, and confirmed that the Windows Search service is automatic and running.

    As an example of the Issue, I have a number of files whose names begin with "Yellow". If I navigate in File Explorer to This PC\E:\Users\Public\Documents or through a Quick Access link, and enter "Yellow" in the search box, I get a list of 257 such files, which I believe to be a correct search - not all file names have "Yellow" in them, so I think it is indexing by content as well as file name. But if I navigate to either This PC\C:\Users\Public\Documents or to Libraries\Documents\Documents and enter "Yellow", I get just 10 files, all of which have "Yellow" in the file name. What is much worse, when I navigate to a sub-folder of Documents that contains 6 of the 10 files with "Yellow" in their names, a search for "Yellow" gives the ridiculous result "No items match your search"!

    Questions: Why does one case include contents and the other only name? It seems like the Libraries link is going to C: rather than E:, but I'm almost certain I put E:\Users\Public\Documents into Libraries. And what could cause the difference in search behavior depending on the level in the directory tree?

    Sorry for the length of this query, but this is complicated and weird behavior that I am trying to understand. If anyone can point me to a Windows File System/Explorer for Dummies, I will be glad to look for answers there!
    Junctions, Libraries for multiple drives, and search questions Attached Files
    • File Type: txt x.txt (5.1 KB, 1 views)
      My Computer


  2. Posts : 3,502
    Win_8.1-Pro, Win_10.1607-Pro, Mint_17.3
       #2

    Launch Command Prompt (Admin)
    CD to the parent folder or drive of the folder in question

    dir /aL /s
    ** shows the reparse points (junctions)

    exit
      My Computer


  3. Posts : 2,799
    Linux Mint 20.1 Win10Prox64
       #3

    When you create a junction link. You actually create a shortcut of a folder which contains only few bytes about the linked folder. If you notice, the Junction link also has an arrow.
    Here's an example:
    I created a link "My Music" under This PC->Music which points to D:\00-My Music. "My Music" has an arrow which tells you this folder only contains the info on the actual "D:\00-My Music" folder where all data is stored. Right click on "My Music"->Properties will give the info on the actual "D-00 My Music"

    MKLINK [[/D] | [/H] | [/J]] Link Target
    The target is where the real data is stored.

    More info: Be more efficient and better organized with the MKLink symbolic link tool - TechRepublic

    Junctions, Libraries for multiple drives, and search questions-.png
      My Computer


  4. Posts : 3,502
    Win_8.1-Pro, Win_10.1607-Pro, Mint_17.3
       #4

    topgundcp said:
    When you create a junction link. You actually create a shortcut of a folder which contains only few bytes about the linked folder. If you notice, the Junction link also has an arrow.
    .....
    Great tip ... unless shortcut arrows are turned off. Y won't see the visual reminder. Still a good tip.


    Nothing can be stored in a reparse point (Junction) - it's a pointer, not a container. It might look as though there are things there, but that's a reflection of what is really in the Target of the pointer.

    Searches are a bit of a learning curve. Indexing only affects finding content in the file. Searches will always find files, boy if a file contains the word yellow in it and the contents are not indexed, then you have to specifically tell Search to look in the contents when you start the search.

    See:
    Advanced Query Syntax (Windows)
    and
    Use the Search Contextual tab in Windows 10 to efficiently find files - TechRepublic

    to get you started with better searching.

    I have noticed that Searching C: turns up things on E: and F: - Libraries point to folders on those drives.
      My Computer


  5. Posts : 10
    Windows 10 Home
    Thread Starter
       #5

    Thanks for your responses. Will post how it goes when I get back to this (busy with other things right now).
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:59.
Find Us




Windows 10 Forums