Saturday, April 19, 2014

Adding non-indexed folders on Windows shares to a Windows Library

I've traded in my Windows Server 2012 domain for a FreeNAS server. One of the many advantages is that you can disable Offline Files completely. Unfortunately, you need Offline Files for being able to add shares as folders in your Windows 7/8 libraries. If you just add a shared folder to your library, you will get the error:

This network location can't be included because it's not indexed.

Apparently, you can't choose to do the indexing on your Windows 7/8 system and that's that.
It took me some time to come up with a good solution, but the guys and girls at My Digital Life have put up a workaround. See the lower half of this page.
Here are the steps:
  1. Create a dummy folder with any name. You can use the same name with the network folder name.
  2. Add and include the dummy folder into the Library.
  3. Delete the dummy folder (it won’t be removed from the Library).
  4. Open an elevated Command Prompt window (Run as Administrator), and use the following command to make a symbolic link which links the dummy folder to the network location:

    mklink /d "\full\path\to\dummy\folder" "\\full\path\to\remote\folder"

    Change the "\full\path\to\dummy\folder" and "\\full\path\to\remote\folder" to actual full path to the folders.
  5. Visit the Library, and the contents from the non-indexed remote location linked via symbolic link is now appearing inside the Library.
If you want to remove the link, because you want to update it, for instance, just use rmdir "link"