Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7788639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:03:44+00:00 2026-06-01T21:03:44+00:00

How to create many folders in a sub-folder using System; using System.Collections.Generic; using System.ComponentModel;

  • 0

How to create many folders in a sub-folder

 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
 using System.Drawing;
 using System.Linq;
 using System.Text;
 using System.Windows.Forms;
 using System.IO;
  namespace Progressbar
 {
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
    string path = @"A:\DMS\SCOSTADL";
         try       
         {        
             // Determine whether the directory exists.
             if (Directory.Exists(path))             
             {  
                 MessageBox.Show("Paths Exists already!!!!!!!!!");
                 return;
                  }
             // Try to create the directory.
              DirectoryInfo di = Directory.CreateDirectory(path);
             MessageBox.Show("Directory Created Successfully....!");
             } 
        catch (Exception e)         
         {
             Console.WriteLine("The process failed: {0}", e.ToString());
           }
             finally { }
         }
        }
         }

Here in this example i am able create a folder(DMS) and sub-folder(SCOSTADL) and i want to create many sub-folders along with Sub-folder(SCOSTADL).please give me suggestions……

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T21:03:46+00:00Added an answer on June 1, 2026 at 9:03 pm

    CreateDirectory creates all sub-directories in the path as well, so you can do Directory.CreateDirectory("C:\\abc\\def\\ghi");.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create the following data-structure with js: folders dictionary: folder-id(guid) : ==>
as the title says, I would like to create a many-to-one relationship using Fluent
I have a folder called Client which contains many subfolders. I want to create
I want to create many folders whose names are like folder_x where x is
I have many folders of images, and I want to create a batch file
My file system contains a large number of folders, with the folder names in
I know that horizontal partitioning...you can create many tables. How can you do this
I'm trying to decide whether to create many classes for each content type I
I want to create as many divs as var foo.length, but my code only
Many times I use 'mqsc' for create MQ queue manager from script files but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.