You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

8 lines
414 B

$hits = Get-ChildItem -Path 'e:\code\crm-backend-matt' -Recurse -Filter *.java |
Where-Object { $_.FullName -notmatch '\\target\\' } |
Where-Object {
$b = [IO.File]::ReadAllBytes($_.FullName)
$b.Length -ge 3 -and $b[0] -eq 0xEF -and $b[1] -eq 0xBB -and $b[2] -eq 0xBF
}
if ($hits) { $hits | ForEach-Object { Write-Output ("BOM: " + $_.FullName) } }
else { Write-Output "BOM files: 0" }