Ace your COMPTIA A+ certification with our practice exam. Engage with a variety of questions including multiple choice and performance-based, complete with hints and detailed explanations. Prepare effectively and boost your confidence for the big day!

Practice this question and more.


Which DOS command lists directories in reverse date order with files grouped separately?

  1. Dir /og-d

  2. Dir /x

  3. Dir /s

  4. Set Dircmd=/on /w

The correct answer is: Dir /og-d

This is because the "/o" flag in the "Dir" command allows for sorting based on specific criteria, with "g" representing grouping of files and "-" representing the reverse order. "d" specifies the sorting criteria of date. Option B, "/x" is incorrect as it displays directory or file short names, not the sorting of directories in reverse date order. Option C, "/s" lists all directories and subdirectories in the specified location, regardless of the sorting order. Option D, "Set Dircmd=/on /w" changes the default sorting to be in alphabetical order by name, not by date or grouping.