Solved

Folder Batches

Posted on 2003-12-05
4
302 Views
Last Modified: 2010-04-16
How can I use a Dialog box to select either a folder, or a group of files to be used for a batch job?
0
Comment
Question by:derekthornton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
testn earned 500 total points
ID: 9882698
   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
 
LVL 2

Author Comment

by:derekthornton
ID: 9882728
Alright.That lets me select a group of files, but what if I want to just select a whole folder instead?
0
 
LVL 18

Expert Comment

by:testn
ID: 9882931
0
 
LVL 3

Expert Comment

by:Mariano_Peterson
ID: 9899838
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

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question