Over time, the amount of fragmented data on hard drives might increase incredibly, so you need to defrag your hard drive regularly so that your computer can find things more easily and make the most of its available space. In this guide on MiniTool System Booster, we will explore how to defrag hard drives in 4 ways for you.
What Is Disk Defragmentation?
Every time you create, delete, or edit a file on a hard drive, some data will be broken down into smaller pieces called fragments. If there are too many fragments on the hard drive, your system will suffer from performance loss.
Defragmentation can consolidate files and other data saved on your hard drive to organize storage on your computer. It can put those separated pieces of data back together, which makes it faster for your computer to read the disk and retrieve the files you need.
After having a basic understanding of disk defragmentation, here comes the question – how to defragment hard drive? In the following part, we will introduce 4 ways for you!
How to Defrag Hard Drive Windows 10?
Way 1: How to Defrag Hard Drive via MiniTool System Booster
Disk defragmentation is a key factor in computer performance. To defragment your hard drive for better performance, why not try some third-party disk defragmenters? Here, a PC performance optimizer – MiniTool System Booster is worth a try.
This powerful tool comes with a set of tools such as Program Accelerator, Startup Optimizer, Memory Mechanic, and more to help boost your PC performance. When your computer is sluggish, you can run the Deepclean feature to deal with fragmented hard drives, accumulated junk files, and more. Here’s how to use this tool to defrag your hard drive:
Step 1. Download, install and launch MiniTool System Booster Trial Edition for free.
MiniTool System Booster TrialClick to Download100%Clean & Safe
Step 2. Expand the Performance Home menu and select Deepclean.
Step 3. After clicking on START CLEAN, the following 7 tasks will run in sequence.
- NetBooster
- Internet Cleanup
- Windows Cleanup
- Registry Cleanup
- Security Optimizer
- Program Accelerator
- Memory Mechanic
The sixth task Programmer Accelerator can re-align program data and defragment files on the hard drive to boost file access speed and increase drive efficiency. After scanning, click on OPTIMIZE NOW to start the process.
Way 2: How to Defrag Hard Drive via Defragment and Optimize Drives
Windows comes with an inbuilt disk defragmenter called Defragment and Optimize Drives that reorganizes and regroups data to help improve the performance of your computer. Here’s how to defrag your hard drives with this Windows disk defragmenter:
Step 1. Type defragment in the search bar and select Defragment and Optimize Drives.
Step 2. Select the drive you want to defrag and click on the Optimize button. The time that this process takes depends on the percentage of the capcity used and the defragmenting algorithm.
If you want to change the frequency of a scheduled disk defragmentation task, you can hit Changes settings. And then follow these guidelines:
Step 1. To analyze and optimize your hard drive daily, weekly, or monthly, tick Run on a schedule (recommended) and then select the desired frequency.
Step 2. Make sure the Increase task priority, if three consecutive scheduled runs are missed option is checked.
Step 3. Click on Choose to select the drives you want to optimize on a regular schedule > tick Automatically optimize new drives > save all the changes.
Way 3: How to Defrag Hard Drive via Command Prompt
Command Prompt is one of the most powerful tools in Windows operating systems. It allows you to do almost everything including defragmenting hard drives with a graphical user interface just with some simple commands. Here’s how to defrag a hard drive with it:
Step 1. Type cmd in the search bar to locate Command Prompt and run it with administrative rights.
Step 2. In the command window, type defrag C: and hit Enter to defrag the C drive on your PC. If you would like to defrag other drives, just replace C with another drive letter.
Also see: Use Defrag Command to Defrag a Windows 10/11 Computer
Way 4: How to Defrag Hard Drive via Batch File
Batch file is a special text file that can turn a complex process into a simple task. You can put some commands into the batch file and then run the .bat file with admin privileges to defrag a single hard drive or multiple drives on your PC. To do so:
Step 1. Press Win + R to evoke the Run dialog.
Step 2. Type notepad and hit Enter to open Notepad.
Step 3. Copy and paste the corresponding syntax to the text editor to defrag all the drives on your computer. For example, my computer has C, D, E, F, G drives, so I should copy & paste these words.
@echo off
defrag.exe c: -f
defrag.exe d: -f
defrag.exe e: -f
defrag.exe f: -f
defrag.exe g: -f
Step 4. Click on File in the upper left > select Save As > name the file with the .bat file extension > set Save as type to All Files > save the changes.
Step 5. Run the file as an administrator to defrag the hard drive.
Final Words
As shown above, it is not difficult to defragment your hard drive. If your computer is running slower than usual, the 4 methods we mentioned in this post might help you to defrag hard drives for better performance. Hope you can always run your computer at the best performance!