home *** CD-ROM | disk | FTP | other *** search
- : SPOT.BTM
- : File finder based on Robert Chung's routine, August 1, 1992
- : (minor bug fixed December 7, 1993)
- : Itamar Even-Zohar, itamarez@plato.tau.ac.il
- :
- if "%&" == "" goto help
-
- setlocal
-
- iff %@index[%&,/] gt 0 then
- set position=%@eval[%@index[%&,/]]
- set sw=%@substr[%&,%position,2]
- set str=%@substr[%&,0,%position]
- goto check_switch
- else
- set str=%&
- set prm=/sfla
- rem default search is: path+filename
- goto search
- endiff
-
- :check_switch
- :: (batch checks if /f or /n were typed)
- iff %sw=/n then
- set prm=/sfla
- rem /n means: path+filename
- elseiff %sw=/f then
- rem /f means: filenames+all information
- set prm=/skmla
- endiff
- goto search
-
- :search
- echo FILE FINDER based on Chung's routine August 1, 1992
- echo.
- (for %drv in (c d) do (dir %prm %drv:\%str))
-
- quit
-
- :help
- text
-
- Usage is:
-
- SPOT filename(s) [/n|/f]
-
- where
- /n == path+filename
- /f == full information on files (no path)
- (unfortunately at this stage
- I haven't found the way to
- put paths in front of each filename)
-
- Default is /n
-
- endtext
- quit