I have to write a batch file to delete the oldest file in a folder, but i don't know how to get the name of the oldest file.
I can sort files with DIR, DIR /B /O:D /T:C
but this is a list and i need the first file (since it sorts the oldest first) in that list.
How can I do it?
Thanks