Results 1 to 5 of 5

Thread: Replacing text in a file based on position

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    3

    Replacing text in a file based on position

    What I am trying to accomplish is this in VB 2005:

    Here is a sample of input data from a text file-

    000000001111111122222233333333
    000000001111111122222244444444
    000000001111111122222255555555

    What I would like to do is read 8 characters starting at position 23 and overwrite the first 8 characters in the line. The output would look like this:

    333333331111111122222233333333
    444444441111111122222244444444
    555555551111111122222255555555

    The characters are varaiable but the chunks I need to read and write are always in the same positions.
    There are possibly several thousand lines and up to 10 seperate files in a folder that I need to process this way. I am new to VB 2005 and having a difficult time. Any help would be greatly appreciated.
    Last edited by cferdig; May 10th, 2007 at 06:05 AM. Reason: Added VB version

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