|I want a batch file to go to a log file and get a number and then print it in the window. Here are my problems: the cmd gets the entire line, and It gets that line where it is present in all the log files in that directory. Here is my code:|
findstr "numRemaining: *," toontown*.log
I basically want it to find the number of robots in the game remaining and print it for me. In the log there is a line where it says ..."numRemaining: [number],"... I want the batch file to get that NUMBER ONLY and print it. It would be nice also if every time I pressed enter it would get the number again, or continuously update, until I press escape, if thats possible. This file needs to get the latest file also. This is a problem because the game stores the last 10 logs, and as the robots are defeated the number goes down, which I would like to reload. The log files are named something like this: toontown-yymmdd-hhmmss using the time formats.
To recap I want the most recent log file read and the [number] pulled from numRemaining: [number], on that line, and the number printed repeatedly.