All dir Commands in DOS

7 Spot It!

This timeI intend to give you all “dir” commands in DOS (Disk OperatingSystem). “dir” is one of the most useful commands that used mostly fordisplaying the contents of a directory.

Commandsare as follows:

dir/s– it shows allthe files in the root and sub directories.

dir/a- shows file with specificproperties: h for hidden files, r for read-only files, d list directories, ssystem files etc. example (dir/ah).

dir/b- only displays the file nameand extension.

dir/I- shows the file name in lower case.

dir/c- file size without a sign,indicates three digits for separation.

dir/n- shows the list of the filesand the file name is displayed on the right side.

dir/o- to view the files as ordered,n the name, s based on the size, e based on extension, d based on date or timeetc. example (dir/on).

dir/p- shows list of the files pagewise, to see the next page press any keyboard key.

dir/w- for viewing the files name incolumns.

dir/x- displays the files in standardformat (8 characters) in DOS environment.

dirc: /ah /s > c:dir.txt- listsall hidden files in drive C into a text file called the dir.txt.

dirc: /s > prn-sends list of all files in drive C to the printer.

dir> NULL –sends the result to the NULL and we don’t have anything in output.

7 Spot It!

Be the first to comment

Leave a comment