({{, (RefLink[CreateIntermediateDirectories, paclet:ref/CreateIntermediateDirectories]) 
is an option for (RefLink[CreateDirectory, paclet:ref/CreateDirectory]) and related functions that specifies whether to create intermediate directories in a directory path specified.}})

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Create a subdirectory in a directory:

dir=FileNameJoin[{$TemporaryDirectory,"a","b"}]

CreateDirectory[dir,CreateIntermediateDirectories->False]

Create a directory and a subdirectory as needed:

CreateDirectory[dir]

Check the presence of the new directory:

FileNames[dir]

Delete the directory:

DeleteDirectory[FileNameDrop[dir,-1],DeleteContents->True]

The directory is no longer there:

FileNames[dir]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[CreateDirectory, paclet:ref/CreateDirectory])}})}})