On CBS.com: Time machines cooler than friends

Product Review: Keep your disks maximized with AutoDeFrag

Tags: Scott Lowe MCSE

  • Save
  • Print
  • Digg This
  • 31

Takeaway: Use this open source utility to schedule a defrag in Windows 2000


With Windows XP, scheduling a disk defragmentation process from the command line is built into the operating system, ensuring that you can keep your users’ desktops running smoothly and efficiently.

What? You’re not running Windows XP on your desktops yet? Are you out of luck? Nope! An open source program from MorphaSys called AutoDeFrag can allow you to do the same thing in Windows 2000. While AutoDeFrag is by no means a new piece of software, it continues to be useful and has the potential to significantly reduce desktop problems, as well as to increase user productivity at a cost that makes it even more valuable for any enterprise: free.

How it works
Windows 2000 lacks a built-in method of launching the disk defragmentation utility from the command line at regularly scheduled intervals using the AT command. The executables that launch the two versions of the Windows 2000 disk defragmentation utility—Dfrgfat.exe and Dfrgntfs.exe—can't be launched from the command line. When you try, you are presented with an error box indicating this fact. This is where AutoDeFrag comes in.

AutoDeFrag is a small application that, when executed, launches the built-in disk defragmentation utility in Windows 2000. This allows the utility to be run via the AT command or the Task Scheduler, without the need for a help desk person to visit a machine or for a user to have to remember to do it.

Using AutoDeFrag is as simple as the task it accomplishes. Simply download the utility and run the executable. Once you have it installed, type autodefrag at the command line. If you want to defragment a specific drive, type autodefrag <drive letter> instead. If you do not specify a specific drive, all drives in the system will be defragmented.

Running it on a schedule
As we mentioned, there are two ways to use this utility to automatically schedule a disk defrag in Windows 2000: via the AT command-line utility and using the Task Scheduler. We'll demonstrate each approach by scheduling a defrag every Friday at 11:00 P.M.

Use the AT utility, followed by a listing of the scheduled commands as shown here:
C:\winnt>at 23:00 /every:friday autodefrag
Added a new job with job ID = 1

You can then check to make sure that it's scheduled to run by issuing this command.

Now, let's schedule AutoDeFrag with the Task Scheduler wizard, found in the Control Panel. As you can see in Figure A, starting 12/16/2001, I will be running AutoDeFrag every Friday at 11:00 P.M.

Figure A
Scheduling AutoDeFrag with the Task Scheduler


Summing up
While some organizations are moving to Windows XP, which includes support for a command-line launch of a defrag utility, many others will be sticking with Windows 2000 for the foreseeable future and should find a way to incorporate a regular defrag on each desktop machine. AutoDeFrag allows you to accomplish this without the intervention of the end user or an administrator.

How do you currently handle defrags? Will this tool help?
We look forward to getting your input and hearing about your experiences regarding this topic. Post a comment or a question about this article.

 
  • Save
  • Print
  • Digg This
  • 31

Print/View all Posts Comments on this article

sounds good,edcollinge@...  | 01/08/02
Diskkeeperlgilmore@...  | 01/08/02
Looks great, I will try this!TLSYSADMIN  | 01/08/02
Suxxx!jakubikt@...  | 01/08/02
Same Issuegjb5575@...  | 01/08/02
This assumes W2K can be left runningreinald.smith@...  | 01/08/02
Mine is a 24/7bmajors  | 01/09/02
System restartsMrSid  | 07/22/02
W2KPro can auto-defragdlw6  | 01/08/02
can WKPro autodefrag?Mattius  | 01/09/02
How do you get the defrag button pressed?AaronTech  | 05/10/05
Defrag Schedulerrdelany@...  | 01/08/02
Auto Defragdghaus  | 01/08/02
Great article..alt@...  | 01/08/02
2nd that Great Article!bmajors  | 01/09/02
Windows defrag still leaves you fragmented, i.e...KammerLot  | 01/08/02
Defrag on W2k machinesbill.lafay@...  | 01/08/02
AutodefragMattius  | 01/09/02
diskkeeperlgilmore@...  | 01/08/02
in XP how can you automate the defragrftpers@...  | 01/08/02
Active DirectoryTShelley  | 01/09/02
Running Defrag from WinXPPeterST  | 01/09/02
This Guy Seems To Know...chuckgberry@...  | 08/28/06
Autodefrag will not worktmanuser  | 01/08/02
How does it install?rdavidson@...  | 01/08/02
Install autodefragMattius  | 01/09/02
Auto Defrag for Win2Kkwik0001@...  | 01/08/02
For Win98gdufton@...  | 01/09/02
Dont need it for 98MrSid  | 07/22/02
For Win98gdufton@...  | 01/09/02
Auto Defrag for Win2Kkwik0001@...  | 01/08/02
Another alternativecanonsen  | 01/09/02
NT?john.duncan@...  | 01/09/02
does the at command still run when you akfonner@...  | 01/09/02
can't get autodefrag to work with AT comoutdoorsr  | 01/09/02
Service Running?BarefootBoy  | 01/17/02
How to run Defrag from WinXPPeterST  | 01/09/02
good stuffriyanalc@...  | 01/09/02
YOU ARE A GODPaul.Klerkx@...  | 01/09/02
Autodefrag - user 2low Permissions~Webadmin  | 01/10/02
Need to Run DFRG as Administratordhoffer  | 01/11/02
Silentpetraje@...  | 01/11/02
This certainly one option available for automat...Greg Hayes/Raxco Software  | 01/11/02
AutoDeFrag is a front-end!shiva  | 01/14/02
Check out the source codeshiva  | 01/14/02
Errorsrhennings@...  | 01/17/02
I completely agreeoceanhai  | 01/28/02
Defrag toolRashid Breedy  | 01/21/02
Now I can have my coffeeC#  | 01/23/02
autodefragcagrant@...  | 01/24/02
This thing does not work. Periodoceanhai  | 01/28/02
It works..Mattius  | 01/29/02
I'm afraid not...oceanhai  | 01/30/02
One possible solutionehunter67@...  | 02/07/02
I didn't need any 3rd-party softwareqhcomputingny  | 01/30/02
Checking Resultsmmcsteen@...  | 02/04/02
great tool for Disk managementk4k  | 03/09/02
Fix the multiple instance issuetfenner  | 07/25/02
also,tfenner  | 07/26/02
How do XP Defrag work and Norton compareblouwagie  | 11/20/02
Processor peaks during defragbud4wiser@...  | 11/21/02
Autodefrag and W2K Serverrcrisost@...  | 03/10/03
Auto Defrag in Win2000bbwalters@...  | 11/09/05
Auto Dfrag in Win2000bbwalters@...  | 11/09/05

What do you think?

Article Categories

Security
Security Solutions, IT Locksmith
Networking and Communications
E-mail Administration NetNote, Cisco Routers and Switches
CIO and IT Management
Project Management, CIO Issues, Strategies that Scale
Desktops, Laptops & OS
Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
Data Management
Oracle, SQL Server
Servers
Windows NT, Linux NetNote, Windows Server 2003
Career Development
Geek Trivia
Software/Web Development
Web Development Zone, Visual Basic, .NET
advertisement
Click Here