for /F "tokens=2,3 " %%A in ('findstr /n /I foobar *.txt^|findstr :1:') DO
@echo %%A %%B >>"%tempfile%"
As you can see all *.txt files are investigated. How can I force MSDOS to read
these *.txt files sorted by last modified date of the file in ascending (or descending) order?
By default they are read in alphabetical order (I think).
Furthermore is there a way to retrieve inside the above for loop the last update date
of the original file?
I have read that this should work with a meta-variable like %%~ti
But how do I refer to the underlying file instead of the retrieved token?
Thank you for your help
Sebastian