Skip to content

Instantly share code, notes, and snippets.

@MagicAndi
Created November 23, 2017 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MagicAndi/6320a024b5eb813f60ee3dc65bc0dc61 to your computer and use it in GitHub Desktop.
Save MagicAndi/6320a024b5eb813f60ee3dc65bc0dc61 to your computer and use it in GitHub Desktop.
List folders in a directory to set depth and then output listing to file. Requires PowerShell v5+
Get-ChildItem -Recurse -Directory -Depth 2 | Out-File C:\Temp\FolderListing.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment