How to List Directories and Files in PowerShell
To list directories and files in PowerShell, use Get-ChildItem. On its own, it lists every folder and file in the current location. Add -Directory for folders only, -File for files only and -Recurse to include subfolders. Here it is on a sample Projects folder I created for this article: Output: The Mode column tells you … Read more