This tip was printed from the MalekTips Computer and Technology Help and Tips website at http://malektips.com.

DOS and Batch Files - Forcing the Directory to Display a Certain Way

If you wish to set the directory listings a certain way (when you use the DIR command), set the DIRCMD environmental variable to the parameters you wish to use.

To see a list of possible parameters for the DIRCMD, see the list of possible parameters for the DIR command. Type

DIR /?

To set the DIRCMD environmental variable, add the line

SET DIRCMD=xxxx

in your AUTOEXEC.BAT file, replacing 'xxx' with the parameters you wish to use. For example, the parameter "/ON" would cause your DIR results to be automatically sorted by filename. The "/W" command automatically sets the DIR results to a wide-directory format.


Press the "print" button on your browser or select "File" - "Print" to print this tip. Then, return to DOS and Batch Files - Forcing the Directory to Display a Certain Way
 
Standard disclaimer applies - read http://malektips.com/disclaim.html.