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
Example:
wmic path Win32_VideoController get CurrentHorizontalResolution | FINDSTR [0-9] > X.txt 'Output in a file
wmic path Win32_VideoController get CurrentVerticalResolution | FINDSTR [0-9] > Y.txt
wmic path Win32_VideoController get CurrentRefreshRate | FINDSTR [0-9] > Hz.txt
wmic path Win32_VideoController get CurrentBitsPerPixel | FINDSTR [0-9] > Bits.txt
set /p X= < X.txt 'Input from a file
set /p Y= < Y.txt
set /p Hz= < Hz.txt
set /p Bits= < Bits.txt
set X=%X: =% 'Remove the spaces
set Y=%Y: =%
set Hz=%Hz: =%
set Bits=%Bits: =%
DEL /q X.txt 'Delete file created
DEL /q Y.txt
DEL /q Hz.txt
DEL /q Bits.txt
Four steps.