

"New long-list" format, which displays file names on the far right. Same as wide ( /W), but files are sorted by column, rather than by row. Use /-C to disable the display of separator. Uses bare format (no heading information or summary, only the information itself).ĭisplay the thousand separator in file sizes (e.g., a comma after every third digit), which is the default setting. Attributes is a series of letters, each representing an attribute as shown below.įor example, the option " /A:R-A" would match only files whose attributes ( /A:) are read-only ( R) and not ( -) ready to be archived ( A).

Multiple filespecs are allowed, e.g., " *.txt *.exe".ĭisplays only files with the specified file attributes. Specifies the drive, directory, or files to list. Windows 11, 10, 8, 7, Vista, XP, and 2000 syntax DIR Attributes]] Windows ME, 98, 95, 3.x, and MS-DOS syntax.Select your operating system to jump to the information that applies to your version. The syntax of the dir command has evolved somewhat over time. To override preset options, prefix any switch with - (hyphen), for example, " /-W". Options listed below may be preset in the DIRCMD environment variable. With the /S option, it recurses subdirectories and lists their contents as well. The dir command displays a list of files and subdirectories in a directory. Dir is an internal command available in the command line of all Microsoft operating systems.
