Answers for "mv create directory if not exist"

C#
3

create a directory if it doesnt exist c#

using System.IO;

if(!Directory.Exists("<directory>")){
  Directory.CreateDirectory("<directory>");
}
Posted by: Guest on September-13-2021
-1

Create directory if it does not exist

string currentPath = Directory.GetCurrentDirectory();
if (!Directory.Exists(Path.Combine(currentPath, "ACH")))
    Directory.CreateDirectory(Path.Combine(currentPath, "ACH"));
//at this point your folder should exist
Posted by: Guest on August-12-2021

Code answers related to "mv create directory if not exist"

C# Answers by Framework

Browse Popular Code Answers by Language