- powershell -Command "Get-Item -Path .\*.nds -Filter *.nds | ForEach-Object -Begin { $buff = New-Object System.Byte[] -ArgumentList 4; } -Process { if (!$_.PSIsContainer) { try { $stream = $_.OpenRead(); [void]$stream.Seek(0xc, [System.IO.SeekOrigin]::Begin); $readcount = $stream.Read($buff, 0, $buff.Length); [bitconverter]::ToString($buff, 0, $readcount).Replace('-', ''); }finally { if ($stream) { $stream.Dispose(); } } } } | Set-Content .\1.txt"
复制代码
|