Sceduled tasks for disk defrag
Tony S
07-09-2005, 09:12 PM
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 S wrote:
> 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.
--
Mike Pawlak
John Barnett MVP
07-09-2005, 09:13 PM
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.
--
John Barnett MVP
Associate Expert
http://xphelpandsupport.mvps.org
"Tony S" <TonyS@discussions.microsoft.com> wrote in message
news:067D713B-4984-4BA5-BCA2-989BFC34CBE4@microsoft.com...
> 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
Wesley Vogel
07-09-2005, 09:13 PM
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
"Tony S" <TonyS@discussions.microsoft.com> wrote in message
news:067D713B-4984-4BA5-BCA2-989BFC34CBE4@microsoft.com...
> 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 S
07-09-2005, 09:13 PM
"Wesley Vogel" wrote:
> 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
> "Tony S" <TonyS@discussions.microsoft.com> wrote in message
> news:067D713B-4984-4BA5-BCA2-989BFC34CBE4@microsoft.com...
> > 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
>
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
Doug Knox MS-MVP
07-09-2005, 09:13 PM
Additionally, see www.dougknox.com, Win XP Fixes, Defrag All Hard Disks. This can be run as a scheduled task and will defrag all fixed hard disks.
--
Doug Knox, MS-MVP Windows Media Center\Windows Powered Smart Display\Security
Win 95/98/Me/XP Tweaks and Fixes
http://www.dougknox.com
--------------------------------
Per user Group Policy Restrictions for XP Home and XP Pro
http://www.dougknox.com/xp/utils/xp_securityconsole.htm
--------------------------------
Please reply only to the newsgroup so all may benefit.
Unsolicited e-mail is not answered.
"Tony S" <TonyS@discussions.microsoft.com> wrote in message news:077765C3-1554-4C4E-A82C-917C987029C1@microsoft.com...
>
>
> "Wesley Vogel" wrote:
>
>> 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
>> "Tony S" <TonyS@discussions.microsoft.com> wrote in message
>> news:067D713B-4984-4BA5-BCA2-989BFC34CBE4@microsoft.com...
>> > 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
>>
> 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
Sceduled tasks for disk defrag