Hi,
I have a button and progress bar control in the form. Below code will create folders in c:\ while button click.
private void button2_Click(object sender, EventArgs e)
{
string[] folderName = { "One", "Two", "Three", "Four", "Five" };
progressBar1.Value = 0;
for (int i = 0; i < 5; i++)
{
Directory.CreateDirectory("c:\\" + folderName[i]);
progressBar1.Value += 20;
}
}
Best Regards
Muthuraja