Changing characters in a file - Programmer

This is a discussion on Changing characters in a file - Programmer ; Hi, I need to two write two small programs and was wondering what the best method of achieving it is for any modern-ish version of Windows (XP, 2000, upwards). The first program needs to run through a data file with ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Changing characters in a file

  1. Changing characters in a file


    Hi,

    I need to two write two small programs and was wondering what the best
    method of achieving it is for any modern-ish version of Windows (XP,
    2000, upwards).

    The first program needs to run through a data file with known filename
    character by character, changing the non-text characters 01 5F (in hex)
    to 01 60 (in hex), and the second program does the same thing in
    reverse. Nothing else in the files can be altered, including the
    filename.

    The programs need to be as small as possible, but also easy as possible
    for me to write.
    _
    _/ \___
    Anony-mouse says o_/O _/ \
    "Eek-eek-eek!" \__/_|_/_|\____/

  2. Re: Changing characters in a file

    In article <200320071816415604%anony-mouse@hole.in.the.wall.com>,
    Anony-mouse wrote:

    > Hi,
    >
    > I need to two write two small programs and was wondering what the best
    > method of achieving it is for any modern-ish version of Windows (XP,
    > 2000, upwards).
    >
    > The first program needs to run through a data file with known filename
    > character by character, changing the non-text characters 01 5F (in hex)
    > to 01 60 (in hex), and the second program does the same thing in
    > reverse. Nothing else in the files can be altered, including the
    > filename.
    >
    > The programs need to be as small as possible, but also easy as possible
    > for me to write.


    I've tried using a version Sed, which might have worked, but the file
    contains at least one EOF (hex A1) control code before the actual end
    of the file.

+ Reply to Thread