|
Answer» How do I use the find cmd in a batch file to find a phrase in a text file. Ive use it to find all the "totals" in the file and redirect it to a new file. ECHO:Store Number >>totals.txt ECHO:TITLE MOVIE# COPIES CAT REVENUE RENTALS RTLS LATES LATE >>totals.txt
find "Total" revtitle.txt >>totals.txt I need it by the total and title. Example: "DVD 12 DAYS OF CHRISTMAS Total"
Please Help Sorry, but where in your list is total?
TITLE MOVIE# COPIES CAT REVENUE RENTALS RTLS LATES LATE
To filter out the title is clear. It is TOKEN one.
uliTotal is under the Movie#. DVD A LOT OF LOVE Total 5 Z 3.98 3.98 2 0.00 0I don´t see a way to filter out the title cause not EVERY title has the same amount of words. So if you use a space as delimeter you don´t know how many tokens you have. You need between each COLOUMN a delimeter. like ; or whatever.
counting the lines is easy find /v /c "#~#" (for example) COUNTS all lines which don´t have #~# in it.
sorry Uli
|