Skip to content

Instantly share code, notes, and snippets.

@y0mbo
Created December 3, 2019 20:31
Show Gist options
  • Save y0mbo/5e8c68879958cd070dbd91fd10260552 to your computer and use it in GitHub Desktop.
Save y0mbo/5e8c68879958cd070dbd91fd10260552 to your computer and use it in GitHub Desktop.
PS D:\test>
>> $results = @{}
>> Get-ChildItem -Path . -Recurse -Include *.* | ForEach-Object {
>> $count = Get-Content $_.FullName | Measure-Object -Word
>> $results.Add($_.FullName, $count.Words)}
PS D:\test> $results
PS D:\test>
>> $results = @{}
>> Get-ChildItem -Path . -Recurse -Include *.* | ForEach-Object {
>> $count = Get-Content $_.FullName | Measure-Object -Character
>> $results.Add($_.FullName, $count.Characters)}
PS D:\test> $results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment