Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2007
    Posts
    43

    Grin help for modify and save line in file text

    Hi all, I have a question for modify line in file text it is possible ??

    I have a text file that contains this
    mixer truck File
    S 002A 0C 7FD0416DE057D916 ; oct 08
    S 002A 0D 7F48120C2A48F5E0 ; nov 08
    S 002A 0E 4578D399FB03D7E4 ; service
    # **************************
    S 0030 0C A62726896BA19B1E ; oct 08
    S 0030 0D 5B0404D8321FB86C ; nov 08
    S 0030 0E 57327DC2A862B1FB ; service
    # **************************
    S 02E2 0C A62726896BA19B1E ; oct 08
    S 02E2 0D 5B0404D8321FB86C ; nov 08
    S 02E2 0E 57327DC2A862B1FB ; service
    # **************************
    S 0065 0C B00F1A3D7C809C83 ; oct 08
    S 0065 0D 31BED657C4A8D43A ; nov 08 "modify is here
    S 0065 0E D02F36F0C5B42F23 ; service
    # **************************
    S 006A 0C 94EC9AD1DAE46CE5 ; oct 08
    S 006A 0D A6393DE96AF0EFAF ; nov 08
    S 006A 0E 7E36C0A6A08A5150 ; service
    -----------------------------------------
    New File mixer truck contains this
    S 0065 0C D90AC2225F25CC2B
    S 0065 0D 2CEC00BF93621613

    I would compare new file S 0065 0D 2CEC00BF93621613 and file S 0065 0D 31BED657C4A8D43A ; nov 08 if line idem anything, so different modified line and save without changing the other line

    thanx advance for reply and code

  2. #2
    Join Date
    Jun 2008
    Posts
    108
    It´s not easy to understand you.
    If you want to compare the text in the different lines of your textfile, i think you should use TextFile.ReadToTable () and later you can use the String.Compare () and other String- functions to find and change lines in this file.

  3. #3
    Join Date
    Apr 2007
    Posts
    43
    sorry but it is not easy for me in English, compared the lines, if the line is different, modify the line and then save

    thanx

  4. #4
    Join Date
    Feb 2001
    Location
    Washington State
    Posts
    120
    Maybe you could use TextFile.ReadToString, then use String.Replace to change the text, then use TextFile.WriteFromString to write the changed text back to the text file?

  5. #5
    Join Date
    Apr 2007
    Posts
    43
    Thanx for reply, I'm look and test

Similar Threads

  1. ams6 can save a text file to a utf-8 format???
    By lnd in forum AutoPlay Media Studio 6.0
    Replies: 6
    Last Post: 10-03-2007, 07:49 AM
  2. How to save data from text fields and checkboxes to a file?
    By D0M1N0R in forum AutoPlay Media Studio 6.0
    Replies: 10
    Last Post: 10-02-2006, 01:24 PM
  3. Save as a Text File
    By steven in forum AutoPlay Media Studio 6.0
    Replies: 4
    Last Post: 08-08-2006, 07:56 AM
  4. how to save variables in text file???
    By Jonas DK in forum AutoPlay Media Studio 6.0
    Replies: 23
    Last Post: 09-23-2005, 06:33 PM
  5. HOWTO: Create a Project Template
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-28-2002, 01:49 PM

Posting Permissions

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