CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2005
    Posts
    74

    how to browse any folder path and create new folder

    Hi All,

    I'd like to make some file operations :

    1) want to explorer or browse any folder path by clicking any button.

    2) want to create new folder like C:\OutputFolder automatically after installing exe file or setup file.

    Pls share me how to do them.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: how to browse any folder path and create new folder

    Something like this will open the Explorer at the specified directory :
    Code:
    Process.Start("explorer.exe", "/n,/e,C:\\Test1\\Test2");

  3. #3
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: how to browse any folder path and create new folder

    Quote Originally Posted by soclose View Post
    1) want to explorer or browse any folder path by clicking any button.
    Use the FolderBrowser dialog. This will let you select a folder.
    Quote Originally Posted by soclose View Post
    2) want to create new folder like C:\OutputFolder automatically after installing exe file or setup file.
    Use the CreateDirectory method of the Directory class.
    Code:
    System.IO.Directory.CreateDirectory(@"C:\OutputFolder");

  4. #4
    Join Date
    Jan 2005
    Posts
    74

    Re: how to browse any folder path and create new folder

    Thanks HanneSThEGreaT and Shuja Ali.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured