DOS BAT – Read lines from bottom up
Try this.
[Works on files with less than 100 lines.]
::== r5.bat
@echo off
setLocal EnableDelayedExpansioncall :clear
for /f “tokens=1,* delims=[]" %%a in (‘find /n /v “" ^< myfile’) do (
if %%a LSS 10 (set N=0%%a) else (set N=%%a)
echo !N! %%b >> myfile.num
)
sort /r < myfile.num > myfile.rev
for /f “tokens=1,* delims= " %%a in (myfile.rev) do (
echo %%b | findstr /b /c:"-"
):clear
for %%f in (.num .rev .new) do if exist myfile%%f del myfile%%f
::==