Dos directory command display files and directories in the current directory. If? information will more than 24 rows then information will scroll and you can see only last 24 rows information. Dos directory command support various switches to filter and format results.

Dir/p – Display directories and files in the current directory page wise. If? list is in more than 24 rows then a message “Press any key to continue” display to see list on next page.

Dir/w – Display the files and directories in 5 coulmns. Directory will display in [] brackets to standout.

Dir/l – Display files and directories in lower case.

Dir/ad – Display only directories.

Dir/od – Display the files and directory in date wise ascending order.

Dir/o-d – Display the files and directory in date wise descending order.

Dir/os – Display the files and directory in size wise ascending order.

Dir/o-s – Display the files and directory in size wise descending order.

Dir/oe – Display the files and directory in extension wise ascending order.

Dir/o-e – Display the files and directory in extension wise descending order.

Dir/on – Display the files and directory in alphabetic ascending order.

Dir/o-n – Display the files and directory in alphabetic descending order.

Dir/s – Find the file in directory and sub-directories and display path of file.

Written by Bala Krishna

Bala Krishna is web developer and occasional blogger from Bhopal, MP, India. He like to share idea, issue he face while working with the code.