Sceduled tasks for disk defrag

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
 
M

MAP

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.
 
J

John Barnett MVP

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.
 
W

Wesley Vogel

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

cleanmgr and defrag 3
Windows XP Unable to Defrag 1
unable to defrag 1
disk defrag message 1
Vista disk defrag question 11
Scheduling disk defrag in scheduled tasks 2
Disk Defragmenter Can't Defrag. 6
Defrag, the annoying Vista "feature" 2

Top