Hi, I need some help on creating a report file by reading the 2nd to last line of text
Here's some examples below
https://ibb.co/mTf2HnYhttps://ibb.co/MZCv8dwBasically I've tried playing around with a few formulas but none have got me the results I wanted, basically I have directories of text files, I'm looking at the 2nd to last line of text to get the last number. It's a pain loading up all these files on notepad or notepad ++ and scrolling down to find this out when it would be easier to create a batch file to get the results for me without having to open up these files.
So I'd like to generate a text file called 'report.txt' to gather both the filename and the 2nd to last line of text. However the text files will always be unique and there will be more than one in the directory. The batch file will be in the same directory as the text files so all i'll have to do is run it.
The report file needs to display
Filename1 - 2nd to last line of Text From Filename1
Filename2 - 2nd to last line of Text From Filename2
Filename3 - 2nd to last line of Text From Filename3
etc...
So It'll look something like this
208634168_4.txt - media_1175.ts
208634168_5.txt - media_1200.ts
208634168_6.txt - media_1122.ts
etc...
This is for all text files within the directory.
Thanks