Common​Folder​Query Common​Folder​Query Common​Folder​Query Enum

Definition

Specifies how to group files into folders in the query results and determines whether the query is shallow or deep. Query results for deep queries include all files in all of the subfolders of the current folder, grouped into folders according to the specified option.

public enum CommonFolderQuerypublic enum CommonFolderQueryPublic Enum CommonFolderQuery
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Use a value from the CommonFolderQuery enumeration when you call one of the following methods of the StorageFolder class. For examples that use values from the CommonFolderQuery enumeration, see the topics for these methods.

Call the StorageFolder.IsCommonFolderQuerySupported method to determine whether the CommonFolderQuery value that you want to use is available for the current folder.

Tip

When a query groups files into virtual folders based on a property that can have multiple values (for example, System.Author), a particular file may appear in more than one virtual folder because each folder represents one of the multiple values.

Files that don't have a value for the property that the query uses to group files are typically excluded from query results.

Fields

DefaultQuery DefaultQuery DefaultQuery

A shallow list of the folders in the current folder, similar to the view that File Explorer provides.

You can use this option for any storage location.

GroupByAlbum GroupByAlbum GroupByAlbum

Group files into virtual folders by year based on the System.Music.AlbumTitle property of each file. Each folder will contain all (and only) files with identical values for System.Music.AlbumTitle.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByAlbumArtist GroupByAlbumArtist GroupByAlbumArtist

Group files into virtual folders based on the System.Music.AlbumArtist property of each file. Each folder will contain all (and only) files with identical values for System.Music.AlbumArtist.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByArtist GroupByArtist GroupByArtist

Group files into virtual folders based on the System.Music.Artist property of each file. Each folder will contain all (and only) files with identical values for System.Music.Artist.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByAuthor GroupByAuthor GroupByAuthor

Group files into virtual folders based on the System.Author property of each file. Each folder will represent one author, and contain all files whose System.Author vector contains that author. If a file lists multiple authors, it may appear in more than one of the resulting folders.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByComposer GroupByComposer GroupByComposer

Group files into virtual folders based on the System.Music.Composer property of each file. Each folder will represent one composer, and contain all files whose System.Music.Composer vector contains that composer. If a file lists multiple composers, it may appear in more than one of the resulting folders.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByGenre GroupByGenre GroupByGenre

Group files into virtual folders based on the System.Music.Genre property of each file. Each folder will contain all (and only) files with identical values for System.Music.Genre.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByMonth GroupByMonth GroupByMonth

Group files into virtual folders by month based on the System.ItemDate property of each file. Each folder will contain all (and only) files that have values for System.ItemDate within the same month.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByPublishedYear GroupByPublishedYear GroupByPublishedYear

Group files into virtual folders by year based on the System.Media.Year property of each file. Each folder will contain all (and only) files that have values for System.Media.Year within the same year.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByRating GroupByRating GroupByRating

Group files into virtual folders by rating (1 star, 2 stars, and so on) based on the System.Rating property of each file. Each folder will contain all (and only) files with identical values for System.Rating.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByTag GroupByTag GroupByTag

Group files into virtual folders based on the System.Keywords property of each file. Each folder will represent one tag, and contain all files whose System.Keywords vector contains that tag. If a file lists multiple tags in its System.Keywords vector, it may appear in more than one of the resulting folders.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByType GroupByType GroupByType

Group files into virtual folders by type (for example, Microsoft Word documents, text files, and so forth) based on the System.ItemTypeText property of each file.

You can use this option only for folders in a library or the HomeGroup folder.

GroupByYear GroupByYear GroupByYear

Group files into virtual folders by year based on the System.ItemDate property of each file. Each folder will contain all (and only) files that have values for System.ItemDate within the same year.

You can use this option only for folders in a library or the HomeGroup folder.

See Also