Using .NET, is there any way to create a dialog which allows the user to choose multiple directories by ticking them. The purpose is to scan the chosen directories for certain files.


Did I break daniweb etiquette or something?


I would like to pick up on that since I am trying to do something similar: Make it possible to select multiple folders and on "OK" I parse those folders for a certain file. .net (C#) doesn't seem to allow that out of the box.

So if that's possible, can somebody point out how?

Thanks a lot in advance!

It really depends on how you want to do it. If you just wanted to get a list of a single directory's directories, you could populate a CheckedListBox and then only process the items in the CheckedListBox that are checked. If you wanted to get more in-depth than that, you would want to look into a TreeView that allows checked nodes.

Plenty of code samples are available on the internet for populating a TreeView based on a directory structure:


see if that helps.