RMiguel July 21, 2011 at 04:17:59 Specs: Windows XP
How to find last specific string in a file? For example: I have a text file myfile.txt containing multiple string "SYSTEM OVERVIEW" I want to find the line of the last of that string "SYSTEM OVERVIEW". Can someone help me with these. Thnx in advance..
OK. In my txt file "myfile.txt" there's a lot of string "SYSTEM OVERVIEW" with different values next to it..Ex of the file. SYSTEM OVERVIEW - 12345 , SYSTEM OVERVIEW - ABCDE , SYSTEM OVERVIEW - XXXXX. I want to find or echo only the last SYSTEM OVERVIEW which is XXXXX....i want the output to be SYSTEM OVERVIEW - XXXXX . the last one u suggest is showing all the SYSTEM OVERVIEW values.. Thnx again in advance.
Thnx Razor2.3 it works.. But how can i do these in a multiple files? Ex. I have myfile1.txt, myfile2.txt and myfile3.txt.. I tried the command by just putting (myfile*) but only the myfile3.txt echoed the last line of SYSTEM OVERVIEW...Thnx in advance..
Assuming you wan the last "SYSTEM OVERVIEW" line among all the files, that gets more complicated than I'd normally get with a batch file. If you want the last "SYSTEM OVERVIEW" line in each file, that'd require nesting FOR loops.
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Purch hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.