On The Insider: Jessica Alba Donates after Controversy

Product Review: Keep your disks maximized with AutoDeFrag

Tags: Scott Lowe MCSE

  • Save
  • Print
  • Recommend
  • 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
  • Recommend
  • 31

Print/View all Posts Comments on this article

sounds good, edcollinge@... | 01/08/02
Diskkeeper lgilmore@... | 01/08/02
Looks great, I will try this! TLSYSADMIN | 01/08/02
Suxxx! jakubikt@... | 01/08/02
Same Issue gjb5575@... | 01/08/02
This assumes W2K can be left running reinald.smith@... | 01/08/02
Mine is a 24/7 bmajors | 01/09/02
System restarts MrSid | 07/22/02
W2KPro can auto-defrag dlw6 | 01/08/02
can WKPro autodefrag? Mattius | 01/09/02
How do you get the defrag button pressed? AaronTech | 05/10/05
Defrag Scheduler rdelany@... | 01/08/02
Auto Defrag dghaus | 01/08/02
Great article.. alt@... | 01/08/02
2nd that Great Article! bmajors | 01/09/02
KammerLot | 01/08/02
Defrag on W2k machines bill.lafay@... | 01/08/02
Autodefrag Mattius | 01/09/02
diskkeeper lgilmore@... | 01/08/02
in XP how can you automate the defrag rftpers@... | 01/08/02
Active Directory TShelley | 01/09/02
Running Defrag from WinXP PeterST | 01/09/02
This Guy Seems To Know... chuckgberry@... | 08/28/06
Autodefrag will not work tmanuser | 01/08/02
How does it install? rdavidson@... | 01/08/02
Install autodefrag Mattius | 01/09/02
Auto Defrag for Win2K kwik0001@... | 01/08/02
For Win98 gdufton@... | 01/09/02
Dont need it for 98 MrSid | 07/22/02
For Win98 gdufton@... | 01/09/02
Auto Defrag for Win2K kwik0001@... | 01/08/02
Another alternative canonsen | 01/09/02
NT? john.duncan@... | 01/09/02
does the at command still run when you a kfonner@... | 01/09/02
can't get autodefrag to work with AT com outdoorsr | 01/09/02
Service Running? BarefootBoy | 01/17/02
How to run Defrag from WinXP PeterST | 01/09/02
good stuff riyanalc@... | 01/09/02
YOU ARE A GOD Paul.Klerkx@... | 01/09/02
Autodefrag - user 2low Permissions ~Webadmin | 01/10/02
Need to Run DFRG as Administrator dhoffer | 01/11/02
Silent petraje@... | 01/11/02
Greg Hayes/Raxco Software | 01/11/02
AutoDeFrag is a front-end! shiva | 01/14/02
Check out the source code shiva | 01/14/02
Errors rhennings@... | 01/17/02
I completely agree oceanhai | 01/28/02
Defrag tool Rashid Breedy | 01/21/02
Now I can have my coffee C# | 01/23/02
autodefrag cagrant@... | 01/24/02
This thing does not work. Period oceanhai | 01/28/02
It works.. Mattius | 01/29/02
I'm afraid not... oceanhai | 01/30/02
One possible solution ehunter67@... | 02/07/02
I didn't need any 3rd-party software qhcomputingny | 01/30/02
Checking Results mmcsteen | 02/04/02
great tool for Disk management k4k | 03/09/02
Fix the multiple instance issue tfenner | 07/25/02
also, tfenner | 07/26/02
How do XP Defrag work and Norton compare blouwagie | 11/20/02
Processor peaks during defrag bud4wiser@... | 11/21/02
Autodefrag and W2K Server rcrisost@... | 03/10/03
Auto Defrag in Win2000 bbwalters@... | 11/09/05
Auto Dfrag in Win2000 bbwalters@... | 11/09/05

What do you think?

White Papers, Webcasts, and Downloads

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

Meet Doc

advertisement
Click Here