Changing the list style of the dir command

DIR is an internal command recognized by the command prompt interpreter, and it displays the contents of directory (sub-folders and files). It is possible to format the output of the DIR command by setting an environment variable.

Edit AUTOEXEC.BAT and insert/update these line:

REM /A show all files(System/hidden), /O sort with B(directories first)
REM and N(By name), /P pause for each screen
SET DIRCMD=/A/OGN/P

To get a full list of all the settings available for the DIR command:

DIR /?

Updated: 2 July 2007

Tags:
Category:

Leave a Reply

Your email address will not be published. Required fields are marked *