CreateIntermediateDirectories is an option for CreateDirectory and related functions that specifies whether to create intermediate directories in a directory path specified.
Create a subdirectory in a directory:
Create a directory and a subdirectory as needed:
Check the presence of the new directory:
Delete the directory:
The directory is no longer there: