Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!sgi!omni!bob From: bob@omni.com (Bob Weissman) Newsgroups: comp.os.msdos.apps Subject: WHICH batch file for 4DOS Message-ID: <6266@mondo.omni.com> Date: 4 Apr 91 16:36:42 GMT Organization: Interphase West, Mountain View, CA Lines: 33 Someone was asking for useful 4DOS aliases. This isn't an alias, it's a batch file, but it's a small, fast implementation of the "which" command. I.e., given the name part of a file, it will tell you the full pathname of the file which would be executed. Share and enjoy. ------------------ Cut Here --------------- @echo off rem WHICH.BTM -- usage is WHICH name [name...] setlocal for %p in (%&) gosub OneProg quit :OneProg iff isalias %p then alias %p | input %%f echo "%p" is an alias for "%f" else set f=%@search[%p] iff "%f" == "" then echo "%p" not found else echo %f endiff endiff return ------------------ Cut Here --------------- -- Bob Weissman Internet: bob@omni.com UUCP: ...!{apple,decwrl,pyramid,sgi,uunet}!omni!bob