Sceduled tasks for disk defrag

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

Guest

Simple question I hope! When I set up a scheduled task to defragment my hard
drive, what is the path to the defrag .exe program please?

This must be easy but I can't find it and don't know what the .exe file is
called
Thanks in anticipation
Tony
 
Tony said:
Simple question I hope! When I set up a scheduled task to defragment
my hard drive, what is the path to the defrag .exe program please?

This must be easy but I can't find it and don't know what the .exe
file is called
Thanks in anticipation
Tony


Try this (from the Langalist)

For Win98/Me/XP (Home and Pro), just run NotePad, and enter one line into a
new file:

defrag c:

Save the file and name it "defrag c.bat" or any similar, obvious name ending
in ".bat". You then can click on the file to manually trigger a defrag of
C:. or you can use Task Scheduler to run the batch file whenever you want,
such as late at night.

If you have other drives, you can either defrag them via separate batch
files (a "defrag d.bat" file would contain just the line "defrag d:" for
example), or you can enter the lines serially into one batch file.

I have a file called "defrag_all.bat" for example, and it contains these
lines:

defrag c:
defrag d:
defrag e:
defrag f:

When run, defrag_all.bat defrags the drives one after the other.
 
The location of disk defragmenter is as follows:

%SystemRoot%\system32\dfrg.msc

It isn't an 'exe' file that is why you can't find it.
 
C:\WINDOWS\system32\defrag.exe
or
%windir%\system32\defrag.exe

There are two defrag tools in XP.

dfrg.msc is the pretty one that opens from
Start\All Programs\Accessories\System Tools.

defrag.exe the command line tool that runs in the command prompt.
defrag.exe is the one that you can schedule.

How to Automate Disk Defragmenter Using Task Scheduler Tool in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;555098

Description of the New Command Line Defrag.exe Included with Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;283080

How To Schedule Tasks in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;308569

How to Defragment Your Disk Drive Volumes in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;314848
 
Wesley Vogel said:
C:\WINDOWS\system32\defrag.exe
or
%windir%\system32\defrag.exe

There are two defrag tools in XP.

dfrg.msc is the pretty one that opens from
Start\All Programs\Accessories\System Tools.

defrag.exe the command line tool that runs in the command prompt.
defrag.exe is the one that you can schedule.

How to Automate Disk Defragmenter Using Task Scheduler Tool in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;555098

Description of the New Command Line Defrag.exe Included with Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;283080

How To Schedule Tasks in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;308569

How to Defragment Your Disk Drive Volumes in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;314848

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User
Can I just say thank you to everyone who took the trouble to answer my
qustion. I'm very grateful to all three of you
Regards
Tony S
 
Back
Top