Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Get last line with batch file
Name: DkFusion Date: September 25, 2008 at 08:42:45 Pacific OS: Windows XP CPU/Ram: P4 / 512 MB
Comment:
Hi, I was wondering if it is possible to get the last line of a text file and save it to a variable? I found a script that gets the first line, but I have been unable to write one of my own. I could write it in c++ or VB.NET but with my work environment that is not allowed, so I am stuck with batch files.
Summary: I want to do a (preferably) batch file, that searches for a certain string in a file and deletes the line its at. So if for example the file consists of: multi square john 3323 single square johnp 351...
Summary: I have asimilar question and I am not sure how to modify your answer to fit my needs, could you point me in the right direction. here it is: I have a text file with the following info: lm_loweralph...
Summary: I'd like to write batch to read the last line (that in this case is a number) of a file log.txt and to assign this value to another variable. I shoud repeat this operation every 10 seconds since the l...