Append Text To text file
Posted on 2004-10-13
I have a text file that changes each time a program is run. The text file is call log.txt which is the output of "dir /B > log.txt" in a directory call C:\scans\ . An example of the results could be :
What i need to do is append the text file so it looks like this:
If this is too hard, an alternate solution would be to :
Count occurances of the 3 strings ie how many "OA-" , "BELLE-" and "CG-" occur in the file and list a total at the bottom
OA- count = 5 BELLE- count = 4 CG- count = 4
Which ever is easier.