I have researched a lot to find a suitable answer to this problem, but I am failing .
I can see multiple questions asked here and on other forums also , but no clear answer that brings a clear solution .
I want OpenFileDialog to select file/files for me as well as allow me to select folders also. eg. a. either Multiple files OR multiple folders (- most Prior) b. combination of Files and Folders (-less Prior)
I figured our similar question here ( so please don't mark it as duplicate )
Question 1 [Answer links are broken]
Question 2 [Question isn't completely asking what my requirements are.]
Please guide me through some solution . I am a novice and a learner.
Any help or pointers would be very helpful .
Thanks.
OpenFileDialog
is used to open a file not folder
To allow selection of multiple files set Multiselect property to true
.
For selecting Folder it's mentioned in the docs
If you want to give the user the ability to select a folder instead of a file, use FolderBrowserDialog.
You can't select folder with OpenFileDialog
as well as you can't select files with FolderBrowserDialog
. But there is an open source control for .net which allows you to select both files and folders you can check it here : OpenFileOrFolderDialog
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With