OpenFileDialog - many files

  • Thread starter Piotrek Stachowicz
  • Start date
P

Piotrek Stachowicz

Hi,
Is there any way how can I select more than 1 file in the
OpenFileDialog?! It would be really greate if I could also select a
directory, click open, and recevice all the files in that directory in my
application.

Piotrek
 
M

Morten Wennevik

Hi Piotrek,

You can select more than one file if you set the OpenFileDialog.MultiSelect = true.
You can't select a directory and expect it to add all the files within, but you can use CTRL-A to select all the files within the current directory, which is almost as good.
 
M

Mark Rae

Is there any way how can I select more than 1 file in the OpenFileDialog?!

Set the MultiSelect property = true.
It would be really greate if I could also select a directory, click open,
and recevice all the files in that directory in my application.

If you just want your users to select a directory and then have your app do
something with all the files in that directory without having to display the
directory contents to the user, you could use the BrowseFolder stuff to
select a directory, then reference that folder's contents with the
GetFiles() method in the System.IO namespeace...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top