Given a directory with the following files
image1.txt image2.txt image3.txt
I want to get the oldest file (let the files be sorted by data, old
set variableName = dir /b /od C;\test\image?.txt | findstr ^1
note: this is untested. Source:
Google