Answers for "cmd create directory if not exists"

3

mkdir create if not exists

mkdir -p foo/bar/baz
Posted by: Guest on April-06-2021
0

cp file and create directory if not exists

mkdir -p /foo/bar && cp myfile.txt $_
Posted by: Guest on November-20-2020
-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 "cmd create directory if not exists"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language