Solved

Folder Batches

Posted on 2003-12-05
4
296 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
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
testn earned 500 total points
Comment Utility
   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
Comment Utility
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
Comment Utility
0
 
LVL 3

Expert Comment

by:Mariano_Peterson
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now