dir
Windows CMD · Directories · available in the simulator
What it does
Displays the contents of a directory.
Syntax
dir [unidad:][ruta][archivo] [/a[[:]atributos]] [/b] [/o[[:]orden]] [/s]
Options and parameters
/srecursive in subdirectories
/a:hshows hidden files
/bbare format
/ppauses per screen
/wwide format
/o:Nsorts (N name, S size, D date)
/ADisplays files with specified attributes: H hidden, S system, D directories, R read-only.
dir /a:h/BBare format: names only, with no heading or summary.
dir /b/DDisplays files in columns sorted vertically.
/LDisplays names in lowercase.
/NLong list format with filenames on the right.
/OSorts the list: N name, S size, E extension, D date; use - to reverse.
dir /o:-d/PPauses after each screen of results.
/QDisplays the owner of each file.
/RDisplays alternate data streams for files.
/SIncludes files from all subdirectories.
dir /s *.txt/TSpecifies the time field displayed: C creation, A last access, W last written.
/WWide format, in multiple columns.
/XDisplays 8.3 short names.
/CDisplays thousand separators in file sizes; enabled by default.
Usage examples
dir c:\users\admin\desktopdir c:\windows /sdir c:\windows\system32 /a:hdir c:\ /bdirdir /a /sdir /a:hdir /bdir /o:-ddir /s *.txt