Skip to content

Instantly share code, notes, and snippets.

@ryanmoralesaz
Created June 6, 2025 17:01
Show Gist options
  • Select an option

  • Save ryanmoralesaz/fb8739b50f96be164a1ec49d987dffb6 to your computer and use it in GitHub Desktop.

Select an option

Save ryanmoralesaz/fb8739b50f96be164a1ec49d987dffb6 to your computer and use it in GitHub Desktop.
A powershell script to list all folders in a project tree excluding node modules, build and dist
Get-ChildItem -Recurse | Where-Object { $_.FullName -notmatch "node_modules|\.git|dist|build" } | Sort-Object FullName | ForEach-Object {
$indent = " " * (($_.FullName.Split('\').Count) - ($PWD.Path.Split('\').Count) - 1)
$name = if ($_.PSIsContainer) { $_.Name + "/" } else { $_.Name }
"$indent$name"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment