Libraries — special-purpose virtual folders — can be confusing at first. But they are extremely handy, once you get the hang of them.
How to use Libraries is hard to describe but easier to understand when you see them in action — and that’s what this article will show you.
The Windows 7 Help file defines libraries this way:
| “… [A] library is similar to a folder. For example, when you open a library, you’ll see one or more files. However, unlike a folder, a library gathers files that are stored in several locations. This is a subtle, but important, difference. Libraries don’t actually store your items. They monitor folders that contain your items, and let you access and arrange the items in different ways.”|
Maybe I’m a slow learner, but it took several “Aha!” moments before I finally caught on.
The first moment was when I assembled a library of all my music files, which were scattered across several networked PCs. Without copying or moving any files at all, my new music library gave me centralized access to all the music on all the PCs. I could sort the library’s aggregated contents by album, artist, song, rating, date, bitrate, and more. When I sorted the music by name, I could see instantly that I had multiple copies of the same song in different places. When I sorted by the ratings I had assigned, I could select all the five-star songs, from across all the distributed locations, for local playback. And so on, all without moving or copying the original files. Aha!
Another moment arrived while I was working with digital photos. I have thousands, and they’re primarily sorted by year — 2011, 2010, 2009, and so on. I realized I could create, say, a centralized vacation-photos library that would contain just vacation photos, even though those photos in reality would remain spread throughout many different annualized folders. Aha!
Libraries work with any kind of file, not just music and photos. I use libraries for work: I often have more than one PC going, with different parts of different projects on different PCs. I use libraries to gather the distributed materials into one central, virtual location.
And although Microsoft doesn’t play this up, one of the most powerful features of Libraries is enhanced searching: when you perform a Windows Search within a library, you search that library’s full contents, even if the files actually reside in a number of different folders — or even on different systems!
There’s more, but the best way to learn about libraries is actually to work with them. I invite you to try the following step-by-step procedure on your PC as you read through this article — don’t worry; everything thing I describe here is safe and nondestructive.
Getting started: learning library basics
If you’re just beginning to use libraries or you already work with them but want a quick refresher, Microsoft’s four-minute screen-capture video, “Organizing with Windows 7 Libraries: Overview,” covers the basics.
MS TechNet offers good intermediate-level information in its Library FAQ and its “Windows 7 Libraries: Walkthrough.”
If you prefer a more technical primer, try the MSDN article, “Introducing Libraries.”
For the purposes of this demonstration, I created three example folders that I can add to a new library. I put each folder in a different place so you can see how a library aggregates folder content. To help keep things clear, I gave the demo folders blindingly obvious names. One is called SomeFiles and is in my Documents folder. Another folder, SomeGraphics, is in my Pictures folder. A third, SomeDifferentFiles, is a folder on my Desktop.
To work along with me as you read this article, you also need to select three folders in different places. (Why three? Because it’s enough for you to see what the Libraries feature is all about, without going overboard.) It doesn’t matter what the folders contain or what they’re named or even where they are; you can select folders from any location to which you have access, including networked drives — that is, drives on other PCs.
For simplicity, my demo folders are small, but yours need not be. In fact, libraries are most useful when you’re dealing with large folders with tons of files.
After you mentally select your three folders, it’s time to create a library.
Creating your library, step by step
Figure 1 shows Windows 7’s four default libraries: Documents, Music, Pictures, and Videos. There’s nothing particularly special about these default libraries. They’re just preconfigured examples you can use, delete, or change as you wish.
Figure 1. Windows 7 comes with four default libraries.
For this demo, we’ll create a new library from scratch. Right-click on the Libraries folder in the left pane, select New, then Library, as shown in Figure 2.
Figure 2. Right-click on the Library icon in the left pane to begin creating a new library.
A new, generic Library icon appears in the left pane, and a text box opens to allow you to give it a name. (See Figure 3.) I called mine WS Demo for obvious reasons, but feel free to use any name you like.
Figure 3. I named this new library WS Demo, but you can use any name you wish.
When you click the new icon to open your just-created library, it’s empty — save for a button inviting you to Include a folder. (See Figure 4.)
Figure 4. Begin populating your new library via its Include a folder button.
When you click the Include a folder button, a standard file-browsing dialog box opens. Use it to navigate to, and select, whichever folder you wish to include.
In my case, I navigated to my Documents and selected the SomeFiles folder. You can see the result in Figure 5; SomeFiles (with its contents) has been added to the library.
Remember that no files have been copied or moved. The SomeFiles folder is right where it was before, unchanged. The library is simply giving you an alternate view of that folder.
Figure 5. The new library with the first folder added
So far, the library includes just one location — the folder we’ve just added. This is indicated by the 1 location text, as shown in Figure 6.
Figure 6. A library keeps track of how many locations (folders) you’ve included in it. The location text (circled in yellow) is clickable, allowing you to add more locations.
To add a second location to the library, click the 1 location text. The Library Locations dialog box opens, as shown in Figure 7.
When you first open it, the dialog box shows the library’s current contents. In this demo, you see just the SomeFiles folder, so far.
Figure 7. The Library Locations dialog box lets you add or remove locations from any given library.
Click the Add button on the right side of the dialog box; a separate, standard dialog box opens to let you select additional folders for inclusion in the library.
I added the SomeGraphics folder (from my Pictures) and SomeDifferentFiles (from my Desktop), as shown in Figure 8.
Figure 8. The Library Locations dialog box shows three folders added, each from a different location.
Go ahead and add the folders you wish. When you’re done, click OK.
Your new library is now populated with folders and their files. The default view is shown in Figure 9.
Figure 9. A populated library; default view.
Frankly, the library’s default view isn’t very helpful. It’s useful mainly when you’re in the process of adding or removing folders from a library.
The real power of libraries becomes apparent only when you select different Arrange by: filters, accessible via a pull-down menu in the upper right of the right-hand Library pane (you’ll see this in a moment). These filters let you sort the aggregate contents of your library in a variety of useful ways.
The filters depend on the types of content that the library detects. Yours may be different — and that’s fine — but in the demo, I have the Name, Date, Type, Tag, and Folder arrangement filters available.
Figure 10 shows the application of the Arrange by: Name filter to the demo library. Even though you’re looking at files from three separate locations (and even though no files have been copied or moved), this view lets you work with all the files as if they were in one, local folder.
Figure 10. The Arrange by: Name filter makes all the files appear to be in a single folder.
Go on! Try the Arrange by: Name filter on your new library.
Try the other filters, too. Figure 11 shows the demo library contents arranged by Date; note how the library automatically groups files of similar age, regardless of location.
Figure 11. The Arrange by: Date filter sorts your library files chronologically, no matter where the files are actually located.
I won’t show the Type or Tags filters here, to save a little space in this graphics-heavy article. But arranging by Type can be useful when you’re trying to make sense of a very large collection of files and need to get a handle on what’s there.
Tags are extra, user-definable data. Some Tags are preconfigured, such as the star Ratings you can assign to music or photos. You can also create your own Tags for custom Arrange by: sorting. For more information on Tags, see the Microsoft article, “Add tags or other properties to a file.”
Powerful, custom searches via Win 7 Libraries
Alert readers might have noticed something interesting going on in the upper-right corner of the previous screen shots: the search box is already focused on the active library. (See Figure 12.)
Figure 12. Using the Search box (circled in yellow) within a library searches that library’s full contents, even if the files actually reside in a number of different folders — or even on different PCs.
Think about that for a moment: a search in a library automatically includes all the folders in that library. This means you can use a library to search across separate folders, drives, or even different PCs just as easily as if everything were local.
Libraries take some getting used to, but the more you use them, the more they grow on you. Give them a chance — especially if you have large hard drives, many files, or several networked systems. You’ll likely have Aha! moments of your own and find yourself a newly won-over convert to the subtle but considerable power of Windows 7 Libraries.
| Feedback welcome: Have a question or comment about this story? Post your thoughts, praises, or constructive criticisms in the WS Columns forum.|
Fred Langa is a senior editor of the Windows Secrets Newsletter. He was formerly editor of Byte Magazine (1987-91), editorial director of CMP Media (1991-97), and editor of the LangaList e-mail newsletter from its origin in 1997 until its merger with Windows Secrets in November 2006.