PowerShell: Create Directory
Create New Directory
mkdir dirName
💡 TIP:
mkdir
is a builtin function, not a
Cmdlet
, not alias.
Full syntax to make a directory:
New-Item dirName -ItemType directory # dirName can be name or full path
Hide the Output
In a script, it is annoying that mkdir prints output. You can surrpress the output.
mkdir dirName | out-null
out-null
suppress the useless info about the fact you created a directory.
More efficient way to hide output:
$null = mkdir dirName
PowerShell. Create New File or Dir
PowerShell. List Dirs and Files
List Dirs
- PowerShell: Navigate Directory
- PowerShell: Show Current Dir Path
- PowerShell: List Directories
- Show Directory as Tree
- PowerShell: List Empty Dir 📜
- PowerShell: Dir Size 📜
List Files
- PowerShell: List Files
- PowerShell: Show Fullpath, No Truncate Lines
- PowerShell: List Empty Files
- PowerShell: Count Number of Files
- PowerShell: List Files by Wildcard Name Pattern
- PowerShell: Filter File Name by Regular Expression
- PowerShell: List File by Size
- PowerShell: Sort Files by Size 📜
- PowerShell: List Files by Date Time
- PowerShell: Search Text in Files (grep)