Windows 7 Tip of the Week: Master Libraries

Windows 7 Tip of the Week
Master Libraries

Tip date: August 21, 2010
Tipster: Alan Burchill

Windows 7's new Libraries features is one of the biggest changes to Microsoft's latest client OS, and while their use doesn't require a major rethinking compared to the previous scheme of physical and special shell folders, there are indeed some interesting and unique wrinkles to libraries. This week, I'd like to provide some pointers for getting the most out of libraries.

As a refresher, libraries replace the old special shell folders from previous Windows versions--My Documents, My Pictures, My Music, and so on--with virtual folders that work much like physical (i.e. "normal") folders but offer additional features. The key differentiator between libraries and folders is that libraries are not containers like physical folders that map to a single location in the file system. Instead, they aggregate content from multiple folders, providing a single view of all that data in a single place.

If you're familiar with how relational databases work, then this comparison might make sense to you: In database-speak, physical folders are like SQL tables, because they contain data. You can filter and sort that data in different ways, but the data you see will always encompass only that single location. Libraries, meanwhile, are like SQL views: They provide a more malleable way to view data, often from multiple locations, all in a single place. The data you see in a view could come from two or more tables, just as the data you see in a library could come from two or more folders.

If you want to know more, I've written up a lengthy article, Windows 7 Feature Focus: Libraries, that fully explains this new feature. For now, let's get on with the meat of this tip: How you can best take advantage of libraries in Windows 7.

Customize which folders are aggregated

By default, Windows 7 includes four libraries: Documents, Music, Pictures, and Videos. And each of these libraries, by default, displays content from two locations, one in your own user profile, and one in the Public user profile. So the Documents library is an aggregated view of My Documents and Public Documents, Music is an aggregated view of My Music and Public Music, and so on.

You don't have to accept these defaults however. In each case, you can add additional folders to the mix and, just as important, you can also remove folders from the library view. To do so, open Windows Explorer and navigate to the library you wish to edit; I'll use the Documents library in this example. (In Windows 7, new Explorer windows open with the Libraries view, and libraries are available from the Navigation pane.) Then, click the Locations link, which can be found under the Documents library heading and will read "2 locations" by default. When you do so, the Document Library Locations window opens.

From this window, you can perform a number of tasks:

Add and remove library locations. If you don't want to utilize one of the default library locations, you can remove that folder from the list of locations. For example, you may not care about the Public Documents folder, as I don't. So you can select it and then click the Remove button. To add a location, click the Add button. A standard File Open dialog will appear, allowing you to navigate through the file system, including to network-based locations.

(Well, some network-based locations: Windows 7 requires that the server-based system have the latest version of Microsoft Search installed since libraries utilize this technology's indexing functionality to work. If you have a Linux-based NAS or other incompatible network storage device, you're going to have to get creative. Fortunately, there's a handy and free third party tool, the Win7 Library Tool, that will help you connect otherwise incompatible network locations to your libraries.)

Configure the default save location. By default, files you copy into a library are saved into what's called the default save location, and this location, by default, will be your "My [whatever]" folder. So the default save location for the Documents library is My Documents by default. But it doesn't have to be. Once you've configured other folders as locations in the library, you can change the default save location. To do so, right-click on the location in the Locations window and choose "Set as default save location."

Change the location display order. By default, locations within a library are visually ordered in the order in which they were added. And with the default locations, the "My" folders are always listed before the Public locations. You can, of course, change this as well. To do so, open the Locations window for the library in question, right-click the location you wish to change, and choose "Move up" or "Move down."

Custom view styles

Libraries are visually differentiated from physical folders by a small header that includes the name of the library (i.e. Documents library), a Locations link, and, on the right, a set of unique Arrange by options. These Arrange by options are not available in standard folder views and they can be quite interesting, especially for highly visual content like pictures.

The standard Arrange by view in each library is folder, which causes the library to use standard folder views. The other choices vary by library:

Documents: Author, Date modified, Tag, Type, Name

Music: Album, Artist, Song, Genre, Ratings

Pictures: Month, Day, Rating, Tag

Videos: Year, Type, Length, Name

If you're a real power user, you'll recognize this as the Stacks interface that debuted quietly in Windows Vista, which did include virtual folder technologies, but not in an obvious way. Stacks are visual representations of a query, essentially, and in the above figure what you're seeing is a Pictures library sorted by month.

Create your own custom libraries

You aren't stuck with the libraries that God, er ah, Microsoft gave you. That's because Windows 7 lets you create your own libraries. The reasons you might do so are many, but one possibility is a project you're working on--perhaps a book like "Windows Phone Secrets"--that needs files from multiple places on your PC and, perhaps, your home network.

To create a new library, navigate to the Libraries view in Windows Explorer (or just open a new Explorer window). Then, right-click a blank spot in the window (or, the Libraries node in the Navigation pane) and choose New and then Library. A new library icon will appear with the name, New Library, highlighted so you can rename it. Do so.

If you attempt to open the library, you'll be told that it has no included folders to display. So click the Include a folder button to display a File Open dialog you can use to navigate to the correct location. Once that's complete, you'll receive a standard library view, and you can use the Locations link to add and remove location, determine the default save location, and so on.

Note that custom libraries can be shared on a homegroup, just like regular libraries. And some applications--notably the latest versions of the Zune PC software--can add their own libraries. (In the case of Zune, a new Podcasts library is added.) If you delete a custom library, none of the content it aggregates is deleted, just the library file.

Restore the default libraries

Finally, if you've mucked around with your libraries too much and wish to return them to their default state, you can do so by right-clicking the Libraries node in Windows Explorer and choosing "Restore default libraries." This will not affect any custom libraries you've created, but it will return your Documents, Music, Pictures, and Videos libraries to their default states, with two locations and the default save locations.

Have any other library tips you'd like to share? Drop me a note and let me know.