echo off if "%1"=="/?" goto usage if "%1"=="" goto usage d . :path /IEs[t]hP~~/.u + %1.* %2 %3 %4 goto exit :usage echo WHICH: Find out from where DOS will find program f1 to run. echo usage: WHICH f1 o1 o2 o3 .. echo where o1, o2 .. are additional options echo e.g. WHICH FORMAT Show from where the program "FORMAT" is run echo WHICH ED /c a: Find from where "ED" is run and copy it to drive A: :exit