Page 1 of 1
Batch to list file contents but sort newest first
Posted: 12 Oct 2020 04:13
by Hooby1
Is it possible to have a script that when executed, will export the file contents of a folder to a text file but show the exported results with the newest files (date modified) first?
Re: Batch to list file contents but sort newest first
Posted: 12 Oct 2020 05:36
by T3RRY
yes, its possible. read the output of dir /? for usage information regarding the switches needed to sort as per your need.
Re: Batch to list file contents but sort newest first
Posted: 12 Oct 2020 07:49
by Hooby1
Many thanks. I was after something along the line of:
dir /b /W /O-D > updates.txt
and this works great!