An internal command for displaying the names of files within one directory. Widely used by Windows programmers and power users, following are the various Dir options (starting with DOS 5):
dir display all file names
dir > prn print all file names
dir /w across the screen (wide)
dir /p one screenfull at a time
dir *.exe all .EXE files
dir /ad only directories
dir *. only directories plus files
without extensions
dir /o alphabetically (dirs 1st, files 2nd)
dir /on alphabetically (dirs & files mixed)
dir /oe alphabetically by extension (A to Z)
dir /o-e alphabetically by extension (Z to A)
dir /os from smallest to largest size
dir /o-s from largest to smallest size
dir /od from earliest to latest date
dir /o-d from latest to earliest date
dir /ar all read only files
dir /ah all hidden files
dir /aa all files ready for archiving
dir /as all system files
set dircmd=/o /p change defaults
set view current settings
set dircmd= restore defaults