07-23-2023, 02:09 AM
Just write this line:
System.IO.Directory.CreateDirectory("my folder");
- If the folder does **not exist yet**, it will be **created**.
- If the folder **exists already**, the line will be **ignored**.
Reference: [Article about Directory.CreateDirectory at MSDN][1]
*Of course, you can also write `using System.IO;` at the top of the source file and then just write `Directory.CreateDirectory("my folder");` every time you want to create a folder.*
[1]:
System.IO.Directory.CreateDirectory("my folder");
- If the folder does **not exist yet**, it will be **created**.
- If the folder **exists already**, the line will be **ignored**.
Reference: [Article about Directory.CreateDirectory at MSDN][1]
*Of course, you can also write `using System.IO;` at the top of the source file and then just write `Directory.CreateDirectory("my folder");` every time you want to create a folder.*
[1]:
[To see links please register here]