Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am new to writing batch files and i need a little help with a small problem.
The following batch file says, "EXT.BAT locates files on the current drive
:: with one or more extensions supplied
:: by the user.
:: Syntax is: EXT ext1".My question is - Where in the code to I put EXT doc (for example)?
@ECHO OFF
:: EXT.BAT is a multiple extension finder
:: for DOS95, MS-DOS Mode, and Command
:: Prompt Only. It ought to work with
:: previous DOS versions like 6.22 as well.:: EXT.BAT locates files on the current drive
:: with one or more extensions supplied
:: by the user.
:: Syntax is: EXT ext1 [ext2 ext3 ... ]
:: Eg. 'EXT txt wav exe dll' reveals text,
:: wave, executable, and library files
:: on the current drive.:: -- Gord Braun August 1998
IF "%1"=="*" GOTO HELP
:LOOP
DIR \*.%1 /A /S | FIND /V /I "DIR(S)" | FIND /V /I "VOLUME IN" | FIND /V /I "VOLUME SER" | MORE > slow.txt
SHIFT
IF NOT "%1"=="" GOTO LOOP
GOTO END:HELP
ECHO.
ECHO You must provide
ECHO one or more extensions
ECHO for EXT.BAT to search for.
ECHO Eg. EXT txt doc dll htm:END
ECHO.

You don't need to change the code. You just need to execute the batch file with the parameter DOC, like this:
EXT doc
Type that on the command prompt and hit enter (you must be in the same directory as the batch file).
You're probably trying to execute the file via windows explorer (double-clicking). That's not a good method for this file.
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |