Created
June 6, 2025 17:01
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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