Results 1 to 4 of 4

Thread: Changing part of a text file

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    13

    Lightbulb

    I was wondering if there was any way to replace part of a text file so that while one part will change, the rest will stay the same. If there is a way, ho would I go about doing it?
    thanks a bunch
    Pie, I'm just going to go like this and if you get eaten, it's your own fault.- Homer Simpson

  2. #2
    Guest
    If the file isn't huge, just open it, put it in a variable, change it, then write it over the original. I don't know of any way to edit only part of a text file. Doesn't mean it can't be done, but I have no idea how.

  3. #3
    Lively Member
    Join Date
    Aug 2000
    Posts
    125
    for all but very large files it is easiest for me to Line Input it into a string array - make the desired test change to the array variable(s) and then write it back to the sane filename

    It could be done by Imputting the whole file into a simple string variable as well

  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    may be more elborate than you want but you may find some direction and pointers as to what you can accomplish.

    http://forums.vb-world.net/showthrea...818#post114818
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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