Enhanced DIR that only lists executables

When having several DOS programs/games installed, then it is not always easy to remember the executable file needed to start a certain program/game. To help in this situation, one can create a batch file that list the available executable files in the current directory (Ex. BAT, COM, EXE).

Make a batch file called DEX.BAT containing the following lines:

@ECHO OFF
REM *** %1 makes it possible to specify the /S option (With sub-directories) ***
IF EXIST *.BAT DIR *.BAT /B %1
IF EXIST *.COM DIR *.COM /B %1
IF EXIST *.EXE DIR *.EXE /B %1

Updated: 23 September 2007

Tags:
Category:

Comments:

  1. MrShadow says:

    How can someone check if there is a floppy in the floppy drive or not and if not echo a personal message instead of the default abort/retry message? Can it be done with the exist option/check?

  2. snakefoot says:

    MrShadow
    How can someone check if there is a floppy in the floppy drive or not and if not echo a personal message instead of the default abort/retry message? Can it be done with the exist option/check?

    Maybe this can help you :

    http://www.robvanderwoude.com/files/driverdydos.txt

Leave a Reply

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