home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 17
/
CD_ASCQ_17_101194.iso
/
vrac
/
tsbat46.zip
/
SHOW.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-08-29
|
2KB
|
60 lines
echo off
rem The first nine lines constitute a subroutine which SHOW.BAT needs
rem Thus a second batch file is not needed since SHOW.BAT calls itself
rem The subroutine displays a single file
if not "%2"=="recurse" goto _begin
echo File %1
type %1 | more
echo Strike a key for the next file . . .
pause > nul
goto _out
:_begin
echo.
echo ┌─────────────────────────────────────────────────────┐
echo │ Type multiple files and allow wildcarded file names │
echo │ By Prof. Timo Salmi, ts@uwasa.fi, Sat 29-Aug-1992 │
echo └─────────────────────────────────────────────────────┘
echo.
rem If no parameters then give the instructions
if "%1"=="" goto _help
rem Check that show.bat is available at path or current directory
set _found=no
if exist show.bat set _found=yes
for %%d in (%path%) do if exist %%d\show.bat set _found=yes
for %%d in (%path%) do if exist %%dshow.bat set _found=yes
if "%_found%"=="no" goto _no_show
rem Type the files
:_loop
if not exist %1 goto _err
for %%f in (%1) do %comspec% /e:1024 /c show %%f recurse
shift
if not "%1"=="" goto _loop
goto _out
rem Warn if file not found, then try the next
:_err
echo File(s) %1 not found
shift
if not "%1"=="" goto _loop
goto _out
:_no_show
echo You must have show.bat at your path (or the current directory)
goto _out
rem The instructions "(if everything else fails, then rtfm :-)"
:_help
echo Usage: SHOW [FirstFile] [SecondFile] [...]
echo.
echo Examples: SHOW c:\*.bat
echo SHOW tsbat.inf *.pas
echo.
rem That was the whole shebang
set _found=
:_out