Disk Defrag not available in Task Scheduler

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

New computer. When setting up scheduled tasks, disk defrag is not offered as as task. What's up with that?
 
"Mike D" said in
New computer. When setting up scheduled tasks, disk defrag is not
offered as as task. What's up with that?

The crippled version of Diskeeper that Microsoft got license for inclusion
in Windows XP will not do scheduling. It's a crippled version. Diskeeper
obviously wants you to buy their full version which does include scheduling.

If you want use the defrag.exe included in Windows XP, create a .bat file
like below and add it as a scheduled event in Task Scheduler. Run "defrag
/?" to see its command-line parameters. I always reassign my CD-type drives
to start at J: and up, emulated drives (like ISO images for CD drives using
Daemon Tools) start at the other end from Z: backward. Network mapped
drives start somewhere after the CD-type drives, like from N:. So, for me,
the hard drives and their partitions will be somewhere from C: to I:.


_____ mydefrag.bat _____

@echo off
cls

REM - Change list according to the range of local hard drives present.
REM - May list non-existent drives. Should not include CD or emulated
drives.
set drivelist=C,D,E,F,G,H,I

REM - Defragment the drives that exist in the list specified.
for %%a in (%drivelist%) do (
if exist %%a:\nul (
echo ________________________________________
echo Defragmenting drive %%a:
echo.
defrag %%a: /v
echo.
echo Defragment completed for %%a:
)
)

echo ________________________________________
echo DONE!
echo.

set drivelist=
 
Or, just use the Browse button when using the wizard to add an event to Task
Scheduler, and pick "c:\windows\system32\defrag.exe" to schedule a defrag on
each drive separately. Just because it isn't in the dropdown list doesn't
mean you cannot select it. Just use the Browse button.
 
New computer. When setting up scheduled tasks, disk defrag is not offered as as task. What's up with that?

MVP Doug Knox has created a script that can be used in Task Scheduler to
setup regular defrag sessions.
 
Back
Top