home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Supreme Volume 6 #1
/
swsii.zip
/
swsii
/
165
/
CHKFRG14.ZIP
/
DEFRAG.BAT
< prev
next >
Wrap
DOS Batch File
|
1989-08-11
|
448b
|
26 lines
ECHO off
CLS
ECHO Checking condition of drive %1 ...
chkdsk %1/F >lpt1:
chkfrag %1 /L >lpt1:
IF ERRORLEVEL 255 GOTO error
IF ERRORLEVEL 24 GOTO defrag
goto nodefrag
:defrag
ECHO Drive %1 fragmented 25% or more .. starting defrag
defragit %1>lpt1 *** Replace with your utility ***
GOTO end
:nodefrag
ECHO Drive %1 does not require defragging
GOTO end
:error
ECHO Error occured during CHKFRAG.
:end
ECHO DEFRAG done.