Setting Defaults For Windows DOS Directory Listings

Under Windows 9X

  1. Open C:\autoexec.bat in a text editor.
  2. In this file add the line set dircmd=X at the end replacing X with any valid switches for the dir command (visible at a DOS prompt by entering dir /?) separated by a space.
  3. Reboot your system.

Under Windows NT4

  1. Right click on My Computer and select Properties.
  2. Click on the Environment tab.
  3. Click in the System Variables section.
  4. Enter dircmd in the Variable: box
  5. Enter any valid switches for the dir command (visible at a DOS prompt by entering dir /?) separated by a space in the Value:  box.
  6. Click on the Set button.
  7. Click on the OK button until all of the dialog boxes have been closed.

Under Windows 2000 and Windows XP

  1. Right click on My Computer and select Properties.
  2. Click on the Advanced tab.
  3. Click on the Environment Variables Button.
  4. Click on the New... button in the System variables section.
  5. Enter dircmd in the Variable Name: box
  6. Enter any valid switches for the dir command (visible at a DOS prompt by entering dir /?) separated by a space in the Variable Value: box.
  7. Click on the OK button until all of the dialog boxes have been closed.

Now each time you enter dir with no switches at a DOS or command prompt it will behave as if you had typed all of the switches you entered above..

Lila Godel's Web Site
Brought To You By Hamilton Services, Inc.

Contact Me

Access

Access

Home

Home

Links

Links

Miscellaneous

Other

Programs By Me

Programs

Visual Basic

Visual Basic

Windows

Windows