Defrag and optimize your hard drive with the Windows defrag.exe command line tool

Bill Detwiler shows you how to defragment a hard drive from the Windows 7 command line, and use defrag.exe's hidden "boot optimization" switch.

For nearly as long as there have been traditional, platter and spindle hard drives, IT pros and end users have been defragmenting those drives--to reduce the delay retrieving related data.

And unless you're using a solid-state drive, defragmentation should be part of your normal PC maintenance procedure. In fact, the built-in Windows 7 and Vista Disk Defragmenter utility is configured to run once a week by default.

But what if you're an IT pro, and you prefer working from the command line. Or, you want to create a script that defragments the machines you support. Well, that's where the defrag.exe command line tool can help.

During this week's TR Dojo episode, I show you how to defragment a hard drive using the Windows defrag.exe command line utility, and use the tool's hidden "boot optimization" switch.

TR Dojo: Defrag hard drives from the Windows 7 command line

Check out the following TechRepublic resources for more defragmentation tips and tools :

For those who prefer text to video, click the View Transcript link below the video player window or check out Mark Kaelin's article, "Exert control and defrag from the command line in Windows 7," on which this video is based.

You can also sign up to receive the latest TR Dojo lessons through one or more of the following methods:

By Bill Detwiler

Bill Detwiler is Editor in Chief of TechRepublic and the host of Cracking Open, CNET and TechRepublic's popular online show. Prior to joining TechRepublic in 2000, Bill was an IT manager, database administrator, and desktop support specialist in the ...