Dir command can be used to list the files from command prompt. Let’s see different options available with this command.
A simple dir command without any other arguments lists all the files/subfolders that exist in the current folder.
Lists the subfolders/files names in bare format. Just the names will be displayed and no other information (like file modified time, file size etc) will be shown.
List the files in the current folder and also the ones in the subfolders recursively.
Display only directories.
Display only Read-only files.
Display only hidden files
List only the files that have archive attribute set.
List only system files
Exclude directories from the listing and display all other files.
Exclude Read-only files from the listing.
Exclude hidden files from listing.
Exclude files that have archive attribute set.
Exclude system files from listing
Same as Dir but also displays the owner of the file.
Same as Dir but prints Created time for each file
Same as Dir but prints Last accessed time for each file.
Same as Dir but prints last modified time for each file.