title: concat binary files in one omitting the trailer with powershell
body: <p>I have several binary files that need to concat to create one, each has the trailer, but it should be omitted, but the result file should include one line trailer. I was trying to do it by creating the hash table and splitting each line in the array by 256 bytes, but do not know how to split it by number of bytes. This is a sample code I am trying to use, but open to other more efficient solutions:</p>
  
  <pre><code>$ht=@{}
      filter Get-Record { if ($ht[$_] -ne $TrailerLine) {$ht[$_]} }
      $TrailerLine = $null
  
  
      get-content -path $Path\*.* -encoding byte |
      foreach { 
             if (-not $TrailerLine) 
               { $TrailerLine = $_ }
  
              $counter++
              $ht["$($_.split(???)"] = $_
  
           }
  </code></pre>