6. Managing Files and Searching

Understanding File Types

To get the most out of this chapter, you need to understand some background about what a file type is and how Windows 10 determines and works with file types. The next couple of sections tell you everything you need to know to get you through the rest of the chapter.

File Types and File Extensions

One of the fictions that Microsoft has tried to foist on the computer-using public is that we live in a “document-centric” world. That is, that people care only about the documents they create and not about the applications they use to create those documents. The reality is that applications are still too difficult to use and the capability to share documents between applications is still too problematic. In other words, you can’t create documents unless you learn the ins and outs of an application, and you can’t share documents with others unless you use compatible applications.

Unfortunately, we’re stuck with Microsoft’s worship of the document and all the problems that this worship creates. A good example is the hiding of file extensions. As you’ll learn in Chapter 24, “Tweaking and Customizing Windows,” Windows 10 hides file extensions by default, and this creates a whole host of problems, from the confusion of trying to determine a file type based on a teensy icon, to not being able to edit extensions, to not being able to save a file under an extension of your choice. You can overcome all these problems by turning on file extensions, which you can do by checking the View tab’s File Name Extensions check box.

Image To learn more about file extensions, seeTurning On File Extensions,” p. 549.

Why does the lack of file extensions cause such a fuss? Because file extensions determine the file type of a document. In other words, if Windows 10 sees that a file has a .txt extension, it concludes the file uses the Text Document file type. Similarly, a file with the extension .bmp uses the Bitmap Image file type.

The file type, in turn, determines the application that’s associated with the extension. If a file has a .txt extension, Windows 10 associates that extension with Notepad, so the file will always open in Notepad. Nothing else inherent in the file determines the file type; therefore, at least from the point of view of the user, the entire Windows 10 file system rests on the scrawny shoulders of the humble file extension.

This method of determining file types is, no doubt, a poor design decision. For example, there is some danger that a novice user could render a file useless by imprudently renaming its extension. Interestingly, Microsoft seems to have recognized this danger: Windows displays a warning dialog box when you try to change an extension. Microsoft has also programmed a subtle behavior change into recent versions of Windows (Windows Vista and later): When file extensions are turned on and you activate the Rename command (click the file and then press F2), Windows displays the usual text box around the entire filename, but it selects only the file’s primary name (the part to the left of the dot), as shown in Figure 6.1. Pressing any character obliterates the primary name but leaves the extension intact.

Image

Figure 6.1 When you activate the Rename command with file extensions turned on, Windows selects just the file’s primary name.

Despite the drawbacks that come with file extensions, they lead to some powerful methods for manipulating and controlling the Windows 10 file system, as you see in the rest of this chapter.

File Types and the Registry

As you might expect, everything Windows 10 knows about file types is defined in the Registry. (See Chapter 29, “Editing the Windows Registry,” for the details on understanding and using the Registry.) Open the Registry Editor (in the taskbar’s Search box, type regedit, press Enter, and enter your UAC credentials) and examine the HKEY_CLASSES_ROOT key. Notice that it’s divided into two sections:

Image The first part of HKEY_CLASSES_ROOT consists of dozens of file extension subkeys (such as .bmp and .txt). There are well over 400 such subkeys in a basic Windows 10 installation, and there could easily be two or three times that number on a system with many applications installed.


Image Note

HKEY_CLASSES_ROOT also stores information on ActiveX controls in its CLSID subkey. Many of these controls also have corresponding subkeys in the second half of HKEY_CLASSES_ROOT.


Image The second part of HKEY_CLASSES_ROOT lists the various file types associated with the registered extensions. When an extension is associated with a particular file type, the extension is said to be registered with Windows 10.

To see what this all means, take a look at Figure 6.2. Here, we’ve selected the .txt key, which has txtfile as its Default value.

Image

Figure 6.2 The first part of the HKEY_CLASSES_ROOT key contains subkeys for all the registered file extensions.

That Default value is a pointer to the extension’s associated file type subkey in the second half of HKEY_CLASSES_ROOT. Figure 6.3 shows the txtfile subkey associated with the .txt extension. Here are some notes about this file type subkey:

Image

Figure 6.3 The second part of HKEY_CLASSES_ROOT contains the file type data associated with each extension.

Image The Default value is a description of the file type (Text Document, in this case).

Image The DefaultIcon subkey defines the icon that’s displayed with any file that uses this type.


Image Note

The %1 at the end of the command is a placeholder that refers to the document being opened (if any). If you double-click a file named memo.txt, for example, the %1 placeholder is replaced by memo.txt, which tells Windows to run Notepad and open that file.


Image The shell subkey determines the actions that can be performed with this file type. These actions vary depending on the file type, but Open and Print are common. The Open action determines the application that’s associated with the file type. For example, the Open action for a Text Document file type is the following:

%SystemRoot%system32NOTEPAD.EXE %1

Navigating Folder Windows

Let’s take a quick tour of the interface features you’ll find in folder windows. Figure 6.4 shows a typical example of the species, the Documents folder.

Image

Figure 6.4 The main interface elements in a folder window.

Folder Navigation

Windows 10 implements drives and folders as hierarchies that you navigate up, down, and even across. As you can see in Figure 6.4, the Address bar doesn’t show any drive letters or backslashes. Instead, you get a hierarchical path to the current folder. The path in Figure 6.4 has three items, separated by right-pointing arrows:

Image Current folder icon—This icon represents the current folder. You’ll see a bit later that you can use this icon to navigate to your computer drives, your network, the Control Panel, your user folder, and more.

Image This PC—This represents the second level of the sample hierarchy. In the example, this level represents the contents of your PC, including its disk drives (both internal and external), the desktop, and your main user folders.


Image Tip

To copy the full path name (drive, folders, and filename) of the selected file, select Home, Copy Path.


Image Documents—This represents the third level of the sample hierarchy. In the example, this level represents all the subfolders and files that reside in the user’s Documents folder.

This is a sensible and straightforward way to view the hierarchy. However, the real value here lies in the navigation features of the Address bar, and you can get a hint of these features from the nickname that many people have applied to the Address bar: the breadcrumb bar.

Breadcrumbing refers to a navigation feature that displays a list of the places a person has visited or the route a person has taken. The term comes from the fairy tale of Hansel and Gretel, who threw down bits of bread to help find their way out of the forest. This feature is common on websites where the content is organized as a hierarchy or as a sequence of pages.

Windows 10 implements breadcrumb navigation not only by using the Address bar to show you the hierarchical path you’ve taken to get to the current folder, but also by adding interactivity to the breadcrumb path:

Image You can navigate back to any part of the hierarchy by clicking the folder name in the Address bar. For example, in the path shown in Figure 6.4, you could jump immediately to the top-level hierarchy by clicking This PC in the path.

Image You can navigate “sideways” to any part of any level by clicking the right-pointing arrow to the right of the level you want to work with. In Figure 6.5, for example, you see that clicking the arrow beside the current folder icon displays a list of the other navigable items, such as Homegroup, Network, and Control Panel. Clicking an item in this list opens that folder.

Image

Figure 6.5 Breadcrumb navigation: In the Address bar, click a folder’s arrow to see a list of the navigable items in that folder.

Instant Search

The next major element in the Windows 10 folder window interface is the Search box, which appears to the right of the Address bar in all folder windows. Search is everywhere in Windows 10, and we go into it in much more detail later in this chapter (see “Searching Your PC”). For folder windows, however, the Instant Search box gives you a quick way to search for files within the current folder. Most of us nowadays have folders that contain hundreds or even thousands of documents. To knock such folders down to size in Windows 10, you need only type all or part of a filename, and Windows 10 filters the folder contents to show just the matching files, as shown in Figure 6.6. Windows 10 also matches those files that have metadata—such as the author or tags—that match your text.

Image

Figure 6.6 With Instant Search, Windows 10 displays just those files with names or metadata that match your search text.

The Ribbon

Windows 10’s version of the venerable File Explorer file management program comes with a ribbon interface that replaces the menu bar and toolbar in versions prior to Windows 8. As with all ribbons, File Explorer’s is divided into several tabs: File, Home, Share, and View. Also, when you open certain folders or activate certain features, the ribbon sprouts extra contextual tabs that display commands related to the folder or feature. For example, in Figure 6.6 you can see that when you run a search, File Explorer adds the Search Tools contextual tab to the ribbon. Note, too, that because the search was run in the Music folder, Figure 6.6 also shows a Music Tools contextual tab.

The Navigation Pane

The Navigation pane appears on the left side of each folder window, and it offers quick links to the major sections of your system, including your OneDrive, This PC, Network, and Homegroup. The Quick Access section offers access to a few common folders, including Desktop and Downloads, and it also displays folders that you’ve visited frequently.


Image Tip

The Quick Access section is fully customizable. For example, you can add a link to one of your own favorite folders by clicking and dragging that folder and dropping it inside the Quick Access section (you can also right-click the item and then click Pin to Quick Access). If a frequently used folder appears in Quick Access, you can keep it there by pinning it (right-click it and then click Pin to Quick Access). You can also remove links you don’t use (right-click a link under Quick Access and click Unpin from Quick Access).


Basic File and Folder Chores: The Techniques Used by the Pros

Now that you’re familiar with Windows 10’s folders, it’s time to put them through a workout. The next few sections take you through a few basic file and folder chores, including selecting, moving and copying, and renaming.

Selecting Files with Check Boxes

In this chapter, you learn about quite a few substantive elements in the Windows file system: metadata, searching, grouping, filtering, and more. All of these are fairly sophisticated and useful technologies. However, sometimes it’s the small, mundane elements that make your life with an operating system easier and more efficient. In this section, you learn about one of our favorites of Windows 10’s many small but quite useful tweaks: a technique that affects the way you select files.

When you need to select multiple, noncontiguous objects, the easiest method is to hold down the Ctrl key and click each item you want to select. However, when we use this technique to select more than a few files, we always end up accidentally selecting one or more files that we don’t want. It’s not a big deal to deselect these extra files, but it’s one of those small drains on productivity that bugs us (and many other users).

Windows 10 offers a file-selection technique that promises to eliminate accidental selections. With this technique, you use a check box to select individual files and folders. To activate this feature, display File Explorer’s View tab and then check the Item Check Boxes box.


Image Tip

Bonus technique: You can also select all the items in the folder quickly by clicking the check box that appears at the top of the Name column.


As you can see in Figure 6.7, when you turn on this feature, Explorer creates a column to the left of the folder contents in Details view. When you point at a file or folder, a check box appears in this column, and you select an item by activating its check box. You don’t need to hold down Ctrl or use the keyboard at all. Just check the boxes for the files and folders you want to select.

Image

Figure 6.7 In Windows 10, you can select files and folders using check boxes.

Resolving File Transfer Conflicts

When you move or copy a file into the destination folder, it sometimes happens that a file with the same name already resides in that folder. In earlier versions of Windows, you’d see a dialog box asking whether you want to replace the existing file, and you’d click Yes or No, as appropriate. Unfortunately, Windows didn’t give you much information to go on to help you make the choice. Windows 10 takes a step in the right direction by displaying the Replace or Skip Files dialog box instead. Figure 6.8 shows an example.

Image

Figure 6.8 This dialog box appears if a file with the same name already exists inside the destination folder.

This dialog box gives you the following choices:

Image Replace the File in the Destination—Click this option if you want the file you are copying (or moving) to replace the existing file.

Image Skip This File—Click this option if you want Windows 10 to not copy (or move) the file, so the original remains in the destination folder.

Image Compare Info for Both Files—Click this option to see more information about both files, including a thumbnail, the last modified date, and the size. Check the box for the version you want to keep, and then click Continue. Note, too, that you can keep both files by activating both check boxes and then clicking Continue. In this case, the existing file remains as is, and the file being copied or moved is placed in the folder with (2) appended to the filename.

Expert Drag-and-Drop Techniques

You’ll use the drag-and-drop technique throughout your Windows career. To make drag-and-drop even easier and more powerful, here are a few pointers to bear in mind:

Image “Lassoing” multiple files—If the objects you want to select are displayed in a block within the folder list, you can select them by dragging a box around the objects. This is known as lassoing the objects.

Image Drag-and-scroll—Most drag-and-drop operations involve dragging an object from the contents area and dropping it on a folder in the Folders list (be sure to display the Folders list first). If you can’t see the destination in the Navigation pane, drag the pointer to the bottom of the pane. File Explorer will scroll the pane up. To scroll the pane down, drag the object to the top of the pane.

Image Drag-and-open—If the destination is a subfolder within an unopened folder branch, drag the object and hover the pointer over the unopened folder. After a second or two, File Explorer opens the folder branch.

Image Inter-window dragging—You can drag an object outside of the window and then drop it on a different location, such as the desktop.

Image Drag between Explorer windows—Windows 10 lets you open two or more copies of File Explorer (select File, Open New Window). If you have to use several drag-and-drop operations to get some objects to a particular destination, open a second copy of File Explorer and display the destination in this new window. You can then drag from the first window and drop into the second window.

Image Canceling drag-and-drop—To cancel a drag-and-drop operation, either press Esc or click the right mouse button. If you’re right-dragging, click the left mouse button to cancel.

Taking Advantage of the Send To Command

For certain destinations, Windows 10 offers an easier method for copying or moving files or folders: the Send To command. To use this command, select the objects you want to work with, right-click the selection, and then click Send To in the shortcut menu. You see a submenu of potential destinations, as shown in Figure 6.9.

Image

Figure 6.9 The Send To command offers a menu of possible destinations.

Note that the items in this menu (except the disk drives) are taken from the following folder that contains shortcut files for each item:

%UserProfile%appdata oamingMicrosoftWindowsSendTo

This means that you can customize the Send To menu by adding, renaming, and deleting the shortcut files in your SendTo folder.


Image Note

The user profile folder for a user is the following:

%SystemDrive%UsersUser

Here, %SystemDrive% is the drive on which Windows 10 is installed (such as C:), and User is the person’s username. Windows 10 stores the user profile folder for the current user in the %UserProfile% environment variable.


Click the destination you want, and Windows 10 sends the object there. What do we mean by send? We suppose that drop would be a better word because the Send To command acts like the drop part of drag-and-drop. Therefore, Send To follows the same rules as drag-and-drop:

Image If the Send To destination is on a different disk drive, the object is copied.

Image If the Send To destination is on the same disk drive, the object is moved.

The Recycle Bin: Deleting and Recovering Files and Folders

In our conversations with Windows users, we’ve noticed an interesting trend that has become more prominent in recent years: People don’t delete files as often as they used to. We’re sure that the reason for this is the absolutely huge hard disks that are offered these days. Even entry-level systems come equipped with 1TB disks, and multi-terabyte-sized drives are no longer a big deal. Unless someone’s working with digital video files, even a power user isn’t going to put a dent in these massive disks any time soon. So, why bother deleting anything?

Although it’s always a good idea to remove files and folders you don’t need (it makes your system easier to navigate, it speeds up defragmenting, and so on), avoiding deletions does have one advantage: You can never delete something important by accident.

Just in case you do, however, Windows 10’s Recycle Bin can bail you out. The Recycle Bin icon on the Windows 10 desktop is actually a front end for a collection of hidden folders named Recycled that exist on each hard disk volume. The idea is that when you delete a file or folder, Windows 10 doesn’t actually remove the object from your system. Instead, the object moves to the Recycled folder on the same drive. If you delete an object by accident, you can go to the Recycle Bin and return the object to its original spot. Note, however, that the Recycle Bin can hold only so much data. When it gets full, it permanently deletes its oldest objects to make room for newer ones.


Image Tip

If you’re absolutely sure you don’t need an object, you can permanently delete it from your system (that is, bypass the Recycle Bin) by selecting it and pressing Shift+Delete.


It’s important to note that Windows 10 bypasses the Recycle Bin and permanently deletes an object under the following circumstances:

Image You delete the object from a removable drive.


Image Note

OneDrive has its own online Recycle Bin for your OneDrive folder, but it uses it only if you use the web interface for OneDrive; when you delete from the local cache of OneDrive it goes to your local Recycle Bin.


Image You delete the object from the command line.

Image You delete the object from a network drive.

Setting Some Recycle Bin Options

The Recycle Bin has a few properties you can set to control how it works. To view these properties, right-click the desktop’s Recycle Bin icon and then click Properties. Windows 10 displays the Recycle Bin Properties dialog box shown in Figure 6.10.

Image

Figure 6.10 Use this dialog box to configure the Recycle Bin to your liking.

Here’s a rundown of the various controls:

Image Recycle Bin Location—Choose the Recycle Bin you want to configure: You see an icon for each of the hard drive partitions on your computer.

Image Custom Size—Enter the size of the Recycle Bin. The larger the size, the more disk space the Recycle Bin takes up, but the more files it will save.


Image Tip

You can clean out your Recycle Bin at any time by right-clicking the desktop’s Recycle Bin icon and then clicking Empty Recycle Bin. The Recycle Bin contents can also be purged using Windows 10’s Disk Cleanup utility.


Image Do Not Move Files to the Recycle Bin—If you activate this option, all deletions are permanent.

Image Display Delete Confirmation Dialog—For the first time in Windows history, Windows 10 does not ask for confirmation when you delete an object. If you miss the prompt, or if you just want to be super careful about deletions, check this box.

Click OK to put the new settings into effect.

Recovering a File or Folder

If you accidentally delete the wrong file or folder, you can return it to its rightful place by using the following method:

1. Open the desktop’s Recycle Bin icon, or open any Recycled folder in File Explorer.

2. Select the object you want to restore.

3. Click the Manage tab and then click Restore the Selected Items. (You can also right-click the file and then click Restore.)

File Maintenance Using the Open and Save As Dialog Boxes

One of the best-kept secrets of Windows 10 is the fact that you can perform many of these file maintenance operations within two of Windows 10’s standard dialog boxes:

Image Open—In most applications, you display this dialog box by selecting the File, Open command, or by pressing Ctrl+O.

Image Save As—You usually display this dialog box by selecting File, Save As. Or, if you’re working with a new, unsaved file, you select File, Save, or press Ctrl+S.

Here are several techniques you can use within these dialog boxes:

Image To perform maintenance on a particular file or folder, right-click the object to display a shortcut menu like the one shown in Figure 6.11. In particular, note that you can click Cut to move an item, click Copy to copy an item, navigate to the destination folder, and then click Paste to complete the move or copy.

Image

Figure 6.11 You can perform most basic file and folder maintenance right from the Open and Save As dialog boxes.

Image You can click and drag files or folders and drop them on any local or OneDrive folder that appears in the Navigation pane.

Image To create a new object, right-click an empty section of the file list and then click New to get the New menu.

Image To create a new folder within the current folder, click the New Folder button.

Metadata and the File Explorer Property System

We mentioned earlier that Windows is gradually lessening the importance not only of drive letters, but also specific file locations. If file location will become less important, what can you use to take its place as a basis for file organization? Content seems like a pretty good place to start. After all, it’s what’s inside the documents that really matters. For example, suppose you’re working on the Penske account. It’s a pretty good bet that all the Penske-related documents on your system actually have the word Penske inside them somewhere. If you want to find a Penske document, a file system that indexes document content sure helps because then you need only do a content search on the word Penske.

However, what if a memo or other document comes your way with an idea that would be perfect for the Penske account, but that document doesn’t use the word Penske anywhere? This is where purely content-based file management fails because you have no way of relating this new document with your Penske documents. Of course, you could edit the new document to add the word Penske somewhere, but that’s a bit kludgy and, in any case, you might not have write permission on the file. It would be far better if you could somehow identify all of your documents that have “Penske-ness”—that is, that are directly or indirectly related to the Penske account.

This sounds like a job for metadata, and that’s fine because metadata is nothing new in the Windows world:

Image Digital photo files often come with their own metadata for things such as the camera model and image dimensions, and some imaging software enables you to apply tags to pictures.

Image In Windows Media Player, you can download album and track information that gets stored as various metadata properties: Artist, Album Title, Track Title, and Genre, to name just a few.

Image The last few versions of Microsoft Office have supported metadata via the File, Properties command.

Image For all file types, Windows displays in each file’s property sheet a Summary tab that enables you to set metadata properties such as Author, Comments, and Tags.

In Windows 10, metadata is an integral part of the operating system. With the Windows Search engine, you can perform searches on some or all of these properties (see “Searching Your PC,” later in this chapter). You can also use them to group and filter files (see “Grouping and Filtering with Metadata,” later in this chapter).

To edit a document’s metadata, you can use two methods in Windows 10:

Image In File Explorer, select View, Details Pane. In the Details pane that now appears on the right side of the window, click the property you want to edit. Windows 10 displays a text box in which you can type or edit the property value. For example, Figure 6.12 shows a photo’s Title property being edited. Click Save when you’re done.

Image

Figure 6.12 You can edit a document’s configurable metadata directly in the Details pane.

Image Right-click the document and click Properties to display the property sheet, and then click the Details tab. This tab displays a list of properties and their values. To edit a property, click inside the Value column to the right of the property.


Image Note

By default, in most folder windows, Windows 10 displays the Tags and Type properties in File Explorer’s Details view. (Specialized folders such as Music, Pictures, and Videos display other properties in Details view.) To toggle a property’s column on and off, right-click any column header and then click the property. Click More to see a complete list of the available properties.


Searching Your PC

We mentioned earlier that one of the consequences of having massive hard drives is that people tend not to delete files as often as they used to. This means you always have access to your files, but first you have to find them, and the more data you store on your PC, the harder it gets to locate the data you need.

The good news with Windows 10 is that desktop searching—which disappeared in Windows 8/8.1—is back. As you could in Windows 7, you can quickly search your system from the desktop, but instead of using the Start menu, you use the taskbar’s new Search box. When you type a search string, Windows 10 generates a list of matching items on your PC—including Modern apps, desktop programs, settings, and documents—as well as matching items from the Windows Store and the Web (see Figure 6.13).

Image

Figure 6.13 Use the taskbar’s new Search box to run quick desktop searches in Windows 10.

If you don’t see the item you’re looking for, click My Stuff to display an expanded version of the search results. As you can see in Figure 6.14, the expanded results window includes a Show list that contains various items—Document, Apps, Settings, Photos, Videos, Music, and Email—and you click an item to see that subset of the results. Note, too, that Documents, Photos, Videos, and Music show the matching items not only from your PC, but also from your OneDrive.

Image

Figure 6.14 Clicking My Stuff displays an expanded version of the search results.

Desktop searching is powerful in Windows 10 because it uses the Windows Search service, which starts automatically each time you load Windows 10. On the downside, it can still take Windows 10 a long time to search, say, all of drive C. However, that’s because Windows Search does not index the entire drive. Instead, it just indexes your user account data, your offline files (local copies of network files), and your email messages. If you’re searching for one of these indexed locations, Windows 10 searches are lightning quick.

Note that you can control what Windows Search indexes and force a rebuild of the index by opening File Explorer, clicking inside the Search box to display the Search pane in the ribbon, and then selecting Advanced Options, Change Indexed Locations. (You can also open Control Panel and click Indexing Options.) This displays the dialog box shown in Figure 6.15. To customize the search engine, you have two choices:

Image

Figure 6.15 Use the Indexing Options dialog box to control the Windows Search engine.

Image Modify—Click this button to display the Indexed Locations dialog box, which enables you to change the locations included in the index. Check the box for each drive or folder you want to include.


Image Caution

Windows Search takes a long time to index even a relatively small amount of data. If you’re asking Windows Search to index dozens of gigabytes of data, wait until you’re done working for the day and let the indexer run all night.


Image Advanced—Click this button to display the Advanced Options dialog box, which enables you to index encrypted files, change the index location, specify the file types (extensions) you want to include in or exclude from the index. You can also click Rebuild to re-create the index.

As-You-Type Searches with Instant Search

You can also perform desktop-based as-you-type searches in any folder by using the Search box that appears in every File Explorer window.

What gets searched depends on several things:

Image If you just want to search within a particular folder, display that folder before clicking inside the Search box. By default, Windows searches within subfolders as well. To turn that off, click All Subfolders in the ribbon’s Search tab.

Image If you want to search your entire computer, either display the This PC folder and then run the search or click inside the Search box and then click This PC in the ribbon’s Search tab.

Image If you want to search your user account, click the arrow next to the current folder icon in the Address bar (see Figure 6.5, earlier in this chapter), click your user account in the list, and then run the search.


Image Tip

In a folder window, you can access the Search box via the keyboard by pressing Ctrl+E.


Whatever location you choose, as you type, Explorer displays those files in the location with names or metadata that matches your search text, as shown earlier in Figure 6.6.

Using Advanced Query Syntax to Search Properties

When you run a standard text search from any File Explorer Search box, Windows looks for matches not only in the filename and the file contents, but also in the file metadata—the properties associated with each file. That’s cool and all, but what if you want to match only a particular property? For example, if you’re searching your music collection for albums that include the word Rock in the title, a basic search on rock will also return music in which the artist’s name includes rock and the album genre is Rock. This is not good.

To fix this kind of thing, you can create powerful and targeted searches by using a special syntax—called Advanced Query Syntax (AQS)—in your search queries.

For file properties, you use the following syntax:

property:value

Here, property is the name of the file property you want to search on, and value is the criteria you want to use. The property can be any of the metadata categories used by Windows. For example, the categories in a music folder include Name, Track, Title, Artists, Album, and Rating. Right-click any column header in Details view to see more properties such as Genre and Length, and you can click More to see the complete list.

You can also access these properties using the controls in the Search tab’s Refine group (click inside File Explorer’s Search box to see the Search tab). For example, you can use the Date Modified, Kind, and Size lists to construct query strings for those properties, and you can use the Other Properties list to access more properties (the ones you see depend on the current folder).

Here are a few things to bear in mind when constructing AQS strings:

Image If the property name is a single word, use that word in your query. For example, the following code matches music where the Artists property is Coldplay:

artists:coldplay

Image If the property name uses two or more words, remove the spaces between the words and use the resulting text in your query. For example, the following code matches pictures where the Date Taken property is August 23, 2014:

datetaken:8/23/2015

Image If the value uses two or more words and you want to match the exact phrase, surround the phrase with quotation marks. For example, the following code matches music where the Genre property is Alternative & Punk:

genre:"alternative & punk"

Image If the value uses two or more words and you want to match both words in any order, surround them with parentheses. For example, the following code matches music where the Album property contains the words Head and Goats in any order:

album:(head goats)

Image If you want to match files where a particular property has no value, use empty braces, [], as the value. For example, the following code matches files where the Tags property is empty:

tags:[]

You can also refine your searches with the following operators and wildcards:

Image

For even more sophisticated searches, you can combine multiple criteria using Boolean operators:

Image

Image Note

The Boolean operators AND, OR, and NOT must appear in all-uppercase letters in your query.


Saving Searches

After taking all that time to get a search just right, it would be a real pain if you had to repeat the entire procedure to run the same search later. Fortunately, Windows 10 takes pity on searchers by enabling you to save your searches and rerun them any time you like. After you run a search, you save it by clicking the Save Search button in the ribbon’s Search tab. In the Save As dialog box that appears, type a name for the search and click Save. Windows 10 saves your searches in the Searches folder, appropriately enough. (Although note that you can save a search anywhere that’s most convenient, including the desktop.)

Grouping and Filtering with Metadata

Metadata is a useful file system element, but people might not be motivated to apply metadata to their documents unless they can be convinced that metadata is worth the short-term hassle. The Windows programmers seem to understand this because they built two file-management techniques into File Explorer, both of which become more powerful and more useful the more metadata you’ve applied to your files. These techniques are grouping and filtering.

Grouping Files

Grouping files means organizing a folder’s contents according to the values in a particular property. In the Windows 10 version of File Explorer, select the ribbon’s View tab and then click Group By. This displays a list of the properties you can use for the grouping. Clicking one of these properties groups the files according to the values in that property. Figure 6.16 shows the Documents folder grouped by the values in the Type property.

Image

Figure 6.16 Windows 10 enables you to group and work with files based on the values in a property.

As Figure 6.16 shows, Windows 10 enhances the grouping feature with two techniques:

Image You can select all the files in a group by clicking the group title.

Image You can collapse the group (that is, show just the group title) by clicking the arrow to the left of the group title. (You can collapse all the groups by right-clicking any group title and then clicking Collapse All Groups.)

Filtering Files

Filtering files means changing the folder view so that only files that have one or more specified property values are displayed. Returning to the Type property example, you could filter the folder’s files to show only those where Type was, say, JPG Image or File Folder.

In Details view, when you pull down the list associated with a property’s header, you see an item for each discrete property value, along with a check box for each value. To filter the files, check the boxes for the property values you want to view. For example, in Figure 6.17 we’ve checked the boxes beside the Compressed Folder, CSV, and Rich Text Document values in the Type property, and only those three types appear in the folder.

Image

Figure 6.17 You can filter a folder to show only those files that have the property values you specify.

 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.182.211