-
August 9th, 2003, 04:25 PM
#1
Schedule Defrag In XP Home?
Is there some way through task scheduler or by way of running a batch file to schedule a weekly defrag of Windows XP?
Thanks,
Jeff Farrar
“If nothing changes, Nothing changes!”
-
August 9th, 2003, 06:57 PM
#2
Registered User
the defrag utility MS used in XP is based on and certain portions are licensed from Executive Software's Diskeeper. "Set it and Forget" is a thing Executive kept for their own version of the software. If you want scheduled defrags, my advise is go to Diskeeper.
Those who do not know, are lost...
-
August 10th, 2003, 05:38 AM
#3
Geezer
You need to run defrag.exe not the 'pretty' version ...
Originally posted by Rifleman @ Layman's PC
the defrag utility MS used in XP is based on and certain portions are licensed from Executive Software's Diskeeper. "Set it and Forget" is a thing Executive kept for their own version of the software. If you want scheduled defrags, my advise is go to Diskeeper.
Errr umm that's if you are trying to run the 'thing' (dfrg.msc) via the mmc console ... no you can't schedule that (it is what Rifileman explains, a cut down version of a commercial utility) ... However there is a 'another version' hidden away, defrag.exe, this is a command line alternative, but there's nothing to stop you running that in scheduler (it lives in c:\windows\system32 )
-
August 10th, 2003, 05:47 PM
#4
Registered User
There is the command line interface that confus-ed mentioned, so combine that with scheduled tasks from the control panel, should be all that's needed
(found in the Help & Support files)
Defrag
Locates and consolidates fragmented boot files, data files, and folders on local volumes.
Syntax
defrag volume
defrag volume [ /a]
defrag volume [ /a] [ /v]
defrag volume [ /v]
defrag volume [ /f]
Parameters
volume
The drive letter or a mount point of the volume to be defragmented.
/a
Analyzes the volume and displays a summary of the analysis report.
/v
Displays the complete analysis and defragmentation reports.
When used in combination with /a, displays only the analysis report. When used alone, displays both the analysis and defragmentation reports.
/f
Forces defragmentation of the volume regardless of whether it needs to be defragmented.
/?
Displays help at the command prompt.
Remarks- A volume must have at least 15% free space for defrag to completely and adequately defragment it. Defrag uses this space as a sorting area for file fragments. If a volume has less than 15% free space, defrag will only partially defragment it. To increase the free space on a volume, delete unneeded files or move them to another disk.
- You cannot defragment volumes that the file system has marked as dirty, which indicates possible corruption. You must run chkdsk on a dirty volume before you can defragment it. You can determine if a volume is dirty by using the fsutil dirty query command. For more information about chkdsk and fsutil dirty, see Related Topics.
- While defrag is analyzing and defragmenting a volume, it displays a blinking cursor. When defrag is finished analyzing and defragmenting the volume, it displays the analysis report, the defragmentation report, or both reports, and then exits to the command prompt.
- By default, defrag displays a summary of both the analysis and defragmentation reports if you do not specify the /a or /v parameters.
- You can send the reports to a text file by typing >filename.txt, where filename.txt is a file name you specify. For example:
defrag
volume /v >filename.txt
- To interrupt the defragmentation process, at the command line, press CTRL+C.
- Running the defrag command and Disk Defragmenter are mutually exclusive. If you are using Disk Defragmenter to defragment a volume and you run the defrag command at a command-line, the defrag command fails. Conversely, if you run the defrag command and open Disk Defragmenter, the defragmentation options in Disk Defragmenter are unavailable.
May the Schwartz be with you
Too many zeros, not enough ones.
-
August 10th, 2003, 07:04 PM
#5
Registered User
kewl, I've had every version of diskeeper since version3 back in the days of NT4 so I never looked for a way, I just know it wasn't a obvious option and have looked (albeit limited) for a way for some customers...
Learn something new everyday!!!
Thanks
Those who do not know, are lost...
-
August 12th, 2003, 03:34 PM
#6
Junior Member
Actually you can schedule it:
At the command line type:
c:\at 12:00 /every:M,W,F defrag c:
This will schedule your PC to defrag drive c: at noon every m,w,f
To check if it works:
c:\at
It will display the scheduled events...
-
August 12th, 2003, 06:08 PM
#7
Thanks....but I tried that syntax and I receive the error message that windows cannot find "d:\at" as my drive to defrag is D.
Thanks,
Jeff Farrar
“If nothing changes, Nothing changes!”
-
August 12th, 2003, 06:45 PM
#8
Geezer
Originally posted by Farrar
Thanks....but I tried that syntax and I receive the error message that windows cannot find "d:\at" as my drive to defrag is D.
Thanks,
Jeff Farrar
Defrag.exe can just be run in scheduler(like anything else),if you want to do it the 'old' way then 'at' is a system command & should be found wherever you are - try excluding the drive letter, no doubt that's what's confusing things ... (all scheduler is, is a fancy version of 'at' ) ...
So at whatever prompt you are at ('scuse the pun!) type (without quotes) "at 12:00 /every:M,W,F defrag c:" ... (assuming the syntax's right ? Check by typing "at /?" )
-
August 12th, 2003, 06:57 PM
#9
Thanks...that syntax did the job.
Jeff Farrar
“If nothing changes, Nothing changes!”
-
August 12th, 2003, 07:05 PM
#10
Registered User
Originally posted by Farrar
Thanks....but I tried that syntax and I receive the error message that windows cannot find "d:\at" as my drive to defrag is D.
Thanks,
Jeff Farrar
Here's the results when I ran it:
Code:
C:\Documents and Settings\Rell>at 12:00 /every:M,W,F defrag c:
Added a new job with job ID = 1
C:\Documents and Settings\Rell>at
Status ID Day Time Command Line
-------------------------------------------------------------------------------
1 Each M W F 12:00 PM defrag c:
BTW, the created 'at job' will show up in the scheduled tasks if you want to tweak it any further
May the Schwartz be with you
Too many zeros, not enough ones.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks