$b = [System.IO.File]::ReadAllText('fix-prod.b64').Trim() $n = $b.Length $half = [int]($n / 2) $s1 = $b.Substring(0, $half) $s2 = $b.Substring($half) [System.IO.File]::WriteAllText('fix-prod.s1', $s1) [System.IO.File]::WriteAllText('fix-prod.s2', $s2) Write-Host "Total=$n seg1=$($s1.Length) seg2=$($s2.Length)"