home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-386-Vol-2of3.iso
/
c
/
chkfra.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.