This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
How to select multiple folder path usingt FolderBrowserDialog control in vb.net
I want to select many folders for performing some operations on them, like selecting
many files with OpenFileDialog.
The problem is that I can't select multiple folders in time with FolderBrowseDialog.
What is the solution?
That component doesn't allow multiple selections, sorry. You can, however, enable multiple selections in a TreeView to accomplish the task.
Select it one by one. Or custom control: File Explorer using Treeview controller Here is what you need.
Don't forget to mark answer as correct if that helped you.
OpenFolderDialog, apparently does not support multiple item selection:
How to select multiple folder paths using FolderBrowserDialog control in VB.NET
Related
This question already has answers here:
Opening multiple files (OpenFileDialog, C#)
(2 answers)
Closed 3 years ago.
I need to select multiple files from the browse button. Right now, my code only selects one file. I need to select multiple files (by pressing control on Windows or command on Mac) and process them individually.I want a file per each line in my textbox.
OpenFileDialog has a Multiselect property.
Add this into your code(before showing the dialog).
fd.Multiselect = true;
This question already has answers here:
How can I create a “Open with” list as in Explore in my own application
(2 answers)
Closed 3 years ago.
I need to list all the PDF readers available in a given PC.
I've found many ways to get the default one, or to get just the adobe acrobat, but I need to be able to list them all like:
Adobe Acrobat
Foxit
...
Q: Can you list which program is associated with .pdf? A: Yes.
Q: Can you loop through all installed programs, and print out those which read .pdfs?
A: Yes ... but you need to make a list of "which programs read .pdfs". Windows doesn't know this a priori.
PS:
You should probably also include Chrome and Firefox (among others) in your list.
This question already has answers here:
Notification when a file changes?
(3 answers)
Closed 8 years ago.
I have inherited application that, among many other things, has to watch if user writes/deletes text file into specific folder.
Currently, the application uses timer and polls after 5 seconds. I find this ineffective, and wish to improve this part of code.
My question is about existence of the .NET function that monitors changes in directory. Is there such function I can use to detect when a file is written/deleted in a specified folder?
Thank you.
Yes, you have the FileSystemWatcher class. It does exactly what you're looking for
Yes there is. I would suggest you take a look at the FileSystemWatcher class:
http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher%28v=vs.110%29.aspx
It's quite easy to set up, and it monitors for Win32 events, so is relatively inexpensive to use.
This question already has answers here:
Can OpenFileDialog automatically select the file with the value set in FileName if InitialDirectory is set as well?
(2 answers)
Closed 2 years ago.
In C#, once an OpenFileDialog is opened in a specific directory, I would like to be able to set which file in the list is selected (highlighted) as though it had been single-clicked. This will help users remember where they "left off" if they happen to use this dialog multiple times in a row to select sequential files.
Does C# offer a way to do this? Do I need to use a lower-level construct?
You can simply set the FileName property.
This question already has answers here:
Embed a File Chooser in a UserControl / Form
(2 answers)
Closed 4 years ago.
How can I embed the FolderBrowserDialog into my "form1"?
I don't want a popup dialog, how can I achieve this?
You need to implement your own coding for doing so. It is rather easy, you can use some TreeViews and ListViews and use File Path and other stuff from System.IO class.
It is not possible to embed the FolderBrowserDialog in your own form, but you can use 3rd party controls like Shell MegaPack to do this.
DISCLAIMER: I work for LogicNP Software, the developer of Shell MegaPack.