如何在Windows文件资源管理器中选择多个文件(How to select multiple files in windows file explorer)
// Set up the file picker.
Windows.Storage.Pickers.FileOpenPicker openPicker =
new Windows.Storage.Pickers.FileOpenPicker();
openPicker.SuggestedStartLocation =
Windows.Storage.Pickers.PickerLocationId.PicturesLibrary;
openPicker.ViewMode =
Windows.Storage.Pickers.PickerViewMode.Thumbnail;
//Filter to include a sample subset of file types.
openPicker.FileTypeFilter.Clear();
openPicker.FileTypeFilter.Add(".png");
openPicker.FileTypeFilter.Add(".jpeg");
openPicker.FileTypeFilter.Add(".jpg");
//Open the file picker.
Windows.Storage.StorageFile file =
await openPicker.PickSingleFileAsync();
我想打开Windows资源管理器,选择多个图像,然后复制并粘贴到另一个文件夹。 但是,使用这个代码,它并没有帮助我。 enter code here
// Set up the file picker. Windows.Storage.Pickers.FileOpenPicker openPicker = new Windows.Storage.Pickers.FileOpenPicker(); openPicker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.PicturesLibrary; openPicker.ViewMode = Windows.Storage.Pickers.PickerViewMode.Thumbnail; //Filter to include a sample subset of file types. openPicker.FileTypeFilter.Clear(); openPicker.FileTypeFilter.Add(".png"); openPicker.FileTypeFilter.Add(".jpeg"); openPicker.FileTypeFilter.Add(".jpg"); //Open the file picker. Windows.Storage.StorageFile file = await openPicker.PickSingleFileAsync();I want to open Windows Explorer, select multiple images, and copy and paste to another folder. However, with this code I am using, it is not helping me. enter code here
最满意答案
请尝试使用多文件方法。
openPicker.PickMultipleFilesAsync()Try the multiple file method instead.
openPicker.PickMultipleFilesAsync()更多推荐
发布评论