The dir command is a command prompt command that allows you to list the files and subdirectories in a directory.
Windows Command Line Guide – 1 – Introduction to the Command Prompt
For each file or folder listed, the date and time the item was last modified, whether the item is a folder (labeled DIR) or a file, the size of the file (if applicable), and finally the name of the file or folder, including the file extension, are displayed by default.
In addition to listing files and folders, the dir command also displays the current drive letter of the partition, the volume label, the volume serial number, the total number of files listed, the total size of those files in bytes, the number of subfolders listed, and the total number of bytes free on the disk.
The dir command is available through the Command Prompt in all Windows operating systems including Windows 11, Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP.