Here's our Windows XP Tip for.. July 5, 2006
Click Here to see a complete list of all of our previously released Tips!
Automate the DIR Command
If you go to the command prompt and type

set dircmd=/w/o/p

then press Enter, every time thereafter that you type

dir

the /w/o/p switches will be automatically applied. Of course, if you want only the /p switch, you can type

set dircmd=/p

and press Enter.

You can undo the /w or /o or /p on each instance by simply typing

dir /-switch whatever

For example, if you wanted to do a directory with only the /w switch, you could enter

dir /-p/-o

This is a nice trick that I've been using since DOS 5, and it's always made life easier for me. Note that when you exit the Command prompt window, the Dircmd setting returns to its default settings.