Thursday, January 30, 2014

how to get files from sub-folders using "GetFilesAsync()" method

You're actually not fetching the files from the selected folder itself.


Add this after "StorageFolder folder = await op.PickSingleFolderAsync();":



IReadOnlyList<StorageFile> rootFiles = await folder.GetFilesAsync();

foreach (StorageFile file in rootFiles)
{
TextBlock1.Text += file.DisplayName.ToString() + Environment.NewLine;
}




No comments:

Post a Comment