michael4606
asked on
Get the Last Line of a Text File
Hello,
In standard batch file how can I get the last line of a text file?
Like the UNIX\GNU Win32 tail -f. Note I cannot use any tools such as tail.
Thanks,
Michael4606
In standard batch file how can I get the last line of a text file?
Like the UNIX\GNU Win32 tail -f. Note I cannot use any tools such as tail.
Thanks,
Michael4606
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
see
https://www.experts-exchange.com/questions/20739897/Want-to-copy-the-last-2-3-or-4-lines.html
and
https://www.experts-exchange.com/questions/21490763/Need-MS-DOS-Script-to-remove-first-line-and-last-line.html
https://www.experts-exchange.com/questions/23338970/need-batch-script-to-remove-the-first-and-last-two-lines-of-the-file.html
I hope this helps !
https://www.experts-exchange.com/questions/20739897/Want-to-copy-the-last-2-3-or-4-lines.html
and
https://www.experts-exchange.com/questions/21490763/Need-MS-DOS-Script-to-remove-first-line-and-last-line.html
https://www.experts-exchange.com/questions/23338970/need-batch-script-to-remove-the-first-and-last-two-lines-of-the-file.html
I hope this helps !
ASKER
Thanks for posting - that did the trick.
@echo %line%