Folder Batches

How can I use a Dialog box to select either a folder, or a group of files to be used for a batch job?
LVL 2
derekthorntonAsked:
Who is Participating?
 
testnCommented:
   this.OpenFileDialog1 = new System.Windows.Forms.OpenFileDialog();

    // Set the file dialog to filter for graphics files.
    this.OpenFileDialog1.Filter =
        "Images (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|" +
        "All files (*.*)|*.*";

    // Allow the user to select multiple images.
    this.OpenFileDialog1.Multiselect = true;                           // <---- -Set Multi select to be true
    this.OpenFileDialog1.Title = "My Image Browser";

then....

if you hook up with fileok event, you can retrieve list of selected file from

private void OpenFileDialog1_FileOk(object sender,
    System.ComponentModel.CancelEventArgs e)
{
     string[] files = OpenFileDialog1.FileNames;
}
0
 
derekthorntonAuthor Commented:
Alright.That lets me select a group of files, but what if I want to just select a whole folder instead?
0
 
Mariano_PetersonCommented:
So, is there no way to select a group of folders?  I followed the link but couldn't find anything about selecting multiple folders.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.