View Full Version : Disk Defrag not available in Task Scheduler
Mike D
February 26th 04, 05:21 AM
New computer. When setting up scheduled tasks, disk defrag is not offered as as task. What's up with that?
*Vanguard*
February 26th 04, 06:41 AM
"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=
--
__________________________________________________ __________
*** Post replies to newsgroup. E-mail is not accepted. ***
__________________________________________________ __________
*Vanguard*
February 26th 04, 06:41 AM
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.
Sharon F
February 26th 04, 07:01 AM
On Wed, 25 Feb 2004 20:16:06 -0800, Mike D wrote:
> 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.
--
Sharon F
MS MVP - Windows XP Shell/User
Sharon F
February 26th 04, 07:01 AM
On Wed, 25 Feb 2004 20:16:06 -0800, Mike D wrote:
> New computer. When setting up scheduled tasks, disk defrag is not offered as as task. What's up with that?
Sorry, forgot to paste the URL in my last replay for that defrag script:
http://www.dougknox.com/utility/scripts_desc/defrag_all.htm
--
Sharon F
MS MVP - Windows XP Shell/User
vBulletin® v3.6.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.