Windows 7: Adding a Network Directory to a Library without Indexing
Windows 7 introduces Libraries to the PC user, a feature intended to help organize files from the point they are saved. Though powerful when used properly, this feature does have it's limitations and drawbacks, one major one being the difficulty of including network directories in these libraries.
What are Libraries?
The users of many multimedia programs such as iTunes will be familiar with the library format. Basically, it is a virtual folder that contains links to other directories that house the types of files you are looking to organize. Windows 7 takes this concept a step further by applying it to the operating system as a whole, allowing the Documents library to link to various other directories on the local system. Also included are Music, Picture, and Video libraries to do the same.
Any folder on the local hard drive can be added to these libraries to help centralize file access. Though the files will still be stored in their directories on the drive, they can be accessed from the libraries easily.
In many corporate and home networks, you may store files on servers or other networked locations. When trying to add these locations into a library, Windows 7 will tell you that the drive must be indexed and made available offline in order to be added. Depending on the size and amount of files in the network location, this can take a substantial amount of time, and also poses a security risk as the network location must be available offline. It will also eat up valuable disk space as a local copy must be downloaded to the PC.
We will explore a workaround to this problem in this article.
Adding a Network Directory to a Library
To add a network location to a library, use a symlink to point to the network folder location:
- Create a local folder in the C:\Users\username\ directory. This can be named anything you want, so long as it is a valid directory name.
- Add that folder into the library. Open the library from the menu bar, then click on the Includes: # locations link at the top. Click the Add button on the right side and select the folder you just created.
- Delete the local folder that you created. DO NOT remove it from the library.
- Start a Command Prompt (Start->Run, type CMD and press Enter).
- Type the following command: MKLINK /D "LINK" "TARGET". Replace LINK and TARGET with the path of the folder that was just deleted and the path of the network location you wish to add to the library, respectively. For a full explanation of the MKLINK command, type MKLINK /? and hit enter.
If you browse to the C:\Users\Username\ directory, you will now see a symbolic link (symlink) with the same name as the folder that was previously deleted. Exploring this will lead you to the network location that was entered as the target. Open the library, and you should see the network location as a location. Any changes made to the folder in the library will reflect automatically in the network location, and vice versa.
Congratulations, you've just added a network drive to a library without indexing it!
More by this Author
Windows Media Center is a powerful tool for viewing and recording video. When set up with a TV Tuner card, it turns your PC into a customizeable, fully functional DVR. However, the introduction of...