FolderPicker.PickSingleFolderAsync Method


Shows the folderPicker object so that the user can pick a folder. (UWP app)


You must specify the FileTypeFilter before calling this method, or it will throw an exception. To list all folders, use "*" as the filter.

 virtual IAsyncOperation<StorageFolder ^> ^ PickSingleFolderAsync() = PickSingleFolderAsync;
IAsyncOperation<StorageFolder> PickSingleFolderAsync();
public IAsyncOperation<StorageFolder> PickSingleFolderAsync();
function pickSingleFolderAsync()
Public Function PickSingleFolderAsync () As IAsyncOperation(Of StorageFolder)



When the call to this method completes successfully, it returns a storageFolder object that represents the folder that the user picked.



The following remarks relate to Windows 8 and 8.1:

If you try to show the file picker while your app is snapped the file picker will not be shown and an exception will be thrown. You can avoid this by making sure your app is not snapped or by unsnapping it before you call the file picker.

Applies to

See also