Created
October 5, 2016 22:51
-
-
Save atruskie/2c06078b266343445c42d41efd0cc224 to your computer and use it in GitHub Desktop.
A one-liner I used to search through several hundred folders to find which ones did not have the same number of files/directories inside them.
This file contains 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
ls . -Directory | % { $count = (ls $_ -Recurse).Count; $_ | Select *,@{Name="count"; Expression={$count} } } | Group-Object Count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment