Recursive create directories by Powershell

Priesdelly
Jun 22, 2022

--

Creating Directories Using Windows PowerShell

To create a new directory through Windows PowerShell, follow the simple command structure provided below.

Command Syntax:

New-Item -ItemType Directory 'Path'

Example Usage: To create a directory structure test1\test2 in the D:\dev folder, use:

New-Item -ItemType Directory 'D:\dev\test1\test2'

This command will create the specified directory along with all necessary parent directories if they do not already exist.

--

--