PowerShell: list directories
🟢 TIP: Command names and parameter names are case-insensitive.
List Directory Only
List directories only (no file) of current directory:
dir -Directory -Recurse
Show just path (relative to current dir):
dir -Directory -Recurse -name
Show full path path:
dir -Directory -Recurse | ForEach-Object { $_.fullname }
PowerShell. List Dirs and Files
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 📜
List Files
- PowerShell: list files
- PowerShell: show fullpath, no truncate lines
- PowerShell: list empty files 📜
- PowerShell: count files
- PowerShell: list files by wildcard name pattern
- PowerShell: filter file name by regular expression
- PowerShell: sort files by size
- PowerShell: list large files 📜
- PowerShell: sort files by date
- PowerShell: search text in files (grep)