Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extract Certain string from text file, and paste into another text file
#1
Hi, I was trying to make a macro that copies a certain string from a bunch of text file(logA.txt,logB.txt) and summarize it into a single text file(Summary.txt).

the LogA.txt contains texts like below:
-------- Item Count ---------
Name                           Count
ItemA                   22
ItemB                  11
ItemC                    2
------------------------------------

the LogB.txt contains texts like below:
-------- Item Count ---------
Name                           Count
ItemA                   23
ItemB                  15
ItemC                    12
------------------------------------

Lets say I wanted to extract the whole rows of ItemA ( Example: "ItemA                   22") from a bunch of text file and paste in into Summary.txt like this:

LogA.  ItemA                   22
LogB.  ItemA                   23


Is it possible to do this?


Forum Jump:


Users browsing this thread: 1 Guest(s)