How can I change the default Dir output format?

John Savill

January 8, 2000

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. The DIR command has many switches and you can configure your own default behavior for the command instead of the normal format. For example you may want to view the output one page at a time (/p), in lowercase (/l), with files time as their creation rather that last write (/tc) and sorted by extension then name (/oen). Normally you would type

dir /p /l /tc /oen

however this is slightly tedious so to set this as your default perform the following

  1. Start the system control panel applet (Start - Settings - Control Panel - System)

  2. Select the Environment tab

  3. Create the Variable "dircmd" and set the value to your qualifiers, e.g. "/p /l /tc /oen" and click Set

  4. Click Applet then Click OK

Click here to view image

Any new command session will now use the new dir output format.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like