Windows / DOS dir command to list newest files first

— newest
dir/o:-d | more
— oldest
dir/o:d | more

/o switch allows a sort order default is alphabetic

/O List by files in sorted order.
sortorder N By name (alphabetic) S By size (smallest first)
E By extension (alphabetic) D By date/time (oldest first)
G Group directories first - Prefix to reverse order
/P Pauses after each screenful of information.

Leave a Comment

Scroll to Top