Results 1 to 3 of 3

Thread: Find And Replace in File (Hex)

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2017
    Posts
    15

    Find And Replace in File (Hex)

    Hello Professionals .

    i want read/save a file in hex mode to find and replace this 01 00 26 02 to 01 00 32 02
    also files are not in same size .
    actualy i want some thing like replace all in hex mode.

    BR

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: Find And Replace in File (Hex)

    There ain't such thing as hex data.
    All data in files are bytes, hex is just a representation.

    The same question today:
    https://www.vbforums.com/showthread....the-byte-array

    Find patterns in byte arrays:
    https://www.vbforums.com/showthread....=1#post4994843

  3. #3
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,721

    Re: Find And Replace in File (Hex)

    and..

    this is a simple Hex-Editor function.
    as Arnoutdv says, its just a representation of the byte, so 10 is 0A and 255 if FF
    so what u need is a dec > hex and hex > dec function and what u search is a byte array not hex array.
    there should be hundreds of examples about searching bytes using instr if u search here or google.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width