home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-386-Vol-2of3.iso
/
b
/
bak_zap.zip
/
ULTRADIR.BAT
< prev
next >
Wrap
DOS Batch File
|
1989-05-24
|
2KB
|
63 lines
CLS
if "%1" == "" GOTO HOWUSE
for %%G in ( -Q -q ) do if %1==%%G goto QUICKY
for %%G in ( -S -s ) do if %1==%%G goto SEARCHFOR
for %%G in ( -V -v ) do if %1==%%G goto SEARCHAGAINST
REM what will we use find for? Remember, find has a -v option, to exclude
REM instead of including matches.
goto ULTRA
:HOWUSE
ECHO OFF
CLS
ECHO MUST have CHKDSK from DOS in PATH to run. Peter Berger 1989 v1.0
ECHO ____________________________________________________________________________
ECHO Use ALLPATHS when you want the computer to enter all directory names for you
ECHO IE: To delete all *.bak files on your C drive, GO TO YOUR C: DRIVE
ECHO and enter the following:
ECHO ULTRADIR del ALLPATHS\*.bak
ECHO ____________________________________________________________________________
ECHO SPEED OPTIONS: use -Q if you haven't done anything since the last ultradir.
ECHO ULTRADIR -Q del ALLPATHS\myfiles.*
ECHO You cannot run the -Q option right after a run with -S.
ECHO ____________________________________________________________________________
ECHO SEARCH OPTION: use -S STRING if you only want to act on certain directories.
ECHO The STRING is a series of characters that must occur in the pathname.
ECHO YOU MUST TYPE USING ONLY UPPERCASE CAPITAL LETTERS!
ECHO Ie., to delete all files in the arcade directory and all its subdirectories,
ECHO
ECHO ULTRADIR -S ARCADE del ALLPATHS\*.*
ECHO
ECHO Use -V STRING the same way as -S (above), except -V will EXCLUDE all the
ECHO paths with the STRING you specify from the action you specified.
ECHO Careful with -S and -V. Ie., in the last example,
ECHO any path with the letters ARCADE will get hit.
ECHO ____________________________________________________________________________
goto DONE
:SEARCHFOR
REM Get rid of the -S:
shift
chkdsk /v | find "%1" > \disktree.txt
REM Get rid of the "find" search argument:
shift
goto NEW
:SEARCHAGAINST
shift
chkdsk /v | find /v "%1" > \disktree.txt
shift
goto NEW
:ULTRA
chkdsk /v > \disktree.txt
goto NEW
:QUICKY
shift
:NEW
ultranew %1 %2 %3 %4 %5 %6 %7 %8 %9
\disktree
:DONE