[comp.os.msdos.apps] How to implement WHEREIS as a 4dos alias?

dhf@tatum.mitre.org (David H. Friedman) (03/18/91)

.  The superior wildcard capability of the 4dos DIR command make it look
like a good idea to do a WHEREIS file finder as a command alias. The
problem is to list out the full filespecs including the path. There
doesn't appear to be an option to DIR that lists the full filespec.

   Does anyone have any ideas on this? (I'm currently using a WHEREIS
utility that works fine but doesn't have 4dos's wildcarding - e.g., I
can't give WHEREIS *A*.COM and have it list only the files with 'A'
somewhere in the filename, as one could with 4dos.)

richard@calvin.ee.cornell.edu (Richard Brittain - VOS hacker) (03/19/91)

In article <1991Mar18.152431.15843@linus.mitre.org> dhf@tatum.mitre.org (David H. Friedman) writes:
>.  The superior wildcard capability of the 4dos DIR command make it look
>like a good idea to do a WHEREIS file finder as a command alias. The
>problem is to list out the full filespecs including the path. There
>doesn't appear to be an option to DIR that lists the full filespec.

I have never felt a need for this since I would use one of the many unix
"find" look-alikes (I like "stuff" personally).  However I felt ready to rise
to the challenge so here is my entry:

PPATH=iff exist %1 then ^for %%i in ( %1 ) echo %_CWD\%i ^endiff
WHEREIS=global /i /q ppath %1 

This will do everything below the current directory - a bit more work could
make it always search everything, like surrounding the whereis with a
pushd \ ^ ....^ popd

-- 
Richard Brittain,                 School of Elect. Eng.,  Eng. and Theory Center
                                  Cornell university, Ithaca, NY 14853
INTERNET: richard@calvin.ee.cornell.edu	
    UUCP: {uunet,uw-beaver,rochester,cmcl2}!cornell!calvin!richard