PowerShell: create directory
Create New Directory
Using mkdir
mkdir dirName
🟢 TIP:
mkdir is a builtin function, not a
Cmdlet
, not alias.
Using New-Item
New-Item dirName -ItemType directory
Hide mkdir Output
In a script, it is annoying that mkdir prints output. You can surrpress the output.
# sends output to NULL mkdir dirName | out-null
# assignment also suppress output $null = mkdir dirName
PowerShell. Create New File or Dir
PowerShell. Directories and operations
List Dirs
- PowerShell: navigate directory
- PowerShell: show current dir path
- PowerShell: list directories
- PowerShell: show directory as tree
- PowerShell: list empty dir 📜
- PowerShell: dir size 📜