Created
September 29, 2021 07:59
-
-
Save sir-ragna/a2e78ce28505b996d344f879da5c7028 to your computer and use it in GitHub Desktop.
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
# Powershell 5.1 version | |
ls *.wav | % { $file=$_; Get-Content $file.Name -Encoding byte -TotalCount 8 | Select -Last 4 | Foreach-Object {[byte]$a=0} {$a = $a -bor $_} {New-Object PSObject -Property @{status=$(if($a){'size set'}else{'no size set'});file=$file.Name}} } | |
# Powershell 7.1 version | |
ls *.wav | % { $file=$_; Get-Content $file.Name -AsByteStream -TotalCount 8 | Select -Last 4 | Foreach-Object {[byte]$a=0} {$a = $a -bor $_} {New-Object PSObject -Property @{status=$(if($a){'size set'}else{'no size set'});file=$file.Name}} } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment