1 Reply Latest reply on Apr 29, 2009 10:12 AM by insuractive

    Tricky Text File Find / Replace.


      Please forgive me if this question is in the wrong place.


      Part of the process i'm trying to accomplish is this:

      - a text file has various pieces of text that need to be replaced

      - what needs changed is in bold.



      ; Record 5509
      @C ENDDOC# RI-P-00074674
      @C PGCount  1
      @T RI-P-00074674
      @D @I\VOL002\RI007\IMAGES\018\


      ; Record 7882
      @C ENDDOC# RI-P-00081423
      @C PGCount  2
      @T RI-P-00081422
      @D @I\VOL002\RI007\IMAGES\025\


      The path is what I'm trying to replace.   Occasionally, the path will increment from anywhere from 001 to 045.

      The replacement string is @I\VOL001\package_images\ for all paths. 




      I feed it a file with the above data.

      browses for the original location to grab a list of the directories (part of the path)

      Attempting to loop thru the output of the text file to find any of the directory name occurrences and replace them with the final path.


      Three attempts have not been so successful.


      So far so good for:

      - the text file that I feed it

      - grabbing the directory names and building the list to loop with.


      Not good so far:

      - finding / repalcing the instances of the directory names in one pass.

      - limiting the amount of time it takes to process



      Any assistance would be greatly appreciative.