Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Folder Batches

Posted on 2003-12-05
4
Medium Priority
?
305 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 2000 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 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

773 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