home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
open
/
vol7n17.lzh
/
DO.BAT
< prev
next >
Wrap
DOS Batch File
|
1988-09-06
|
1KB
|
48 lines
@ECHO OFF
IF %1X==X GOTO NOPAR
GOTO _%1
REM ---------------------- Lists available functions
:_LIST
ECHO VALID COMMANDS ARE:
TYPE %0.BAT | FIND ":_" | FIND/V "FIND/V" | MORE
GOTO END
REM ---------------------- Finds files anywhere on disk
:_WHERE string [d:]
CHKDSK %3 /V | FIND "%2"
GOTO END
REM ---------------------- DIR of directories only
:_DDIR [path]
DIR %2 | FIND "<DIR>"
GOTO END
REM ---------------------- DIR of files only
:_FDIR [path]
DIR %2 | FIND/V "<DIR>" | FIND/V " 0 " | FIND/V "free"
GOTO END
REM ---------------------- Adds path to current PATH environment
:_ADDPATH path
PATH=%PATH%;%2
PATH
GOTO END
REM ---------------------- Sets or returns to home directory
:_HOME [path]
IF %2X==X GOTO CHANGE
SET HOMEDIR=%2
:CHANGE
IF NOT %HOMEDIR%X==X CD %HOMEDIR%
GOTO END
REM ---------------------- TYPEs file one screen at a time
:_SEE filename
TYPE %2 | MORE
GOTO END
REM ---------------------- Copies to new path, deletes from old
:_MOVE pathname pathname
COPY %2 %3
DEL %2
GOTO END
REM ---------------------- No function error message
:NOPAR
ECHO Error - No FUNCTION specified
ECHO For list type " %0 LIST "
GOTO END
:END