delete some sequence of bytes in Powershell [duplicate]
This question already has an answer here: Methods to hex edit binary files via Powershell 4 answers I have a *.bin file. How can I delete with poweshell some part of bytes (29 bytes, marked yellow) with repeatig sequence of bytes (12 bytes, marked red pen)? Thanks a lot!! Using a very helpful article and ditto function I found here , it seems it is posible to read a binary file and convert it to a string while not altering any of the bytes by using Codepage 28591. With that (I slightly changed the function), you can do this to delete the bytes in your *.bin file: function ConvertTo