In C# windows application, i have a textbox1 and "create folder" button and "Open created folder!" buttons. when, i give a name to textbox1 and press "create folder", a folder create with that name. In next step i want to open the folder which i have created The problem is that i dont know how to open that folder which i created! i can only open a directory before the name of my folder. How can i get the path in "create folder" button and use this path for opening inside of the folder? Here is my Code:
private void button1_Click(object sender, EventArgs e)
{
//create a folder
var adr = System.IO.Directory.CreateDirectory(@"C:\Users\aa\Desktop\test2\" + textBox1.Text);
}
private void button2_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo()
{
FileName = (@"C:\Users\aa\Desktop\test2\"),
UseShellExecute = true,
Verb = "open"
});
