When we install Windows from scratch, or buy a computer, it usually works at full capacity. However, over time, the performance of this usually decreases, giving the feeling that the computer does not work well. And it is that to maintain the proper functioning of the equipment it is necessary to carry out a series of maintenance tasks that allow us to maximize the performance of the equipment. And one of these basic maintenance tasks for Windows to work well is defragmenting hard drives .
What is file fragmentation?
When we copy a file to our hard drive, it is not copied as is from a piece, but is divided into several logical parts . These parts fill in the free spaces that are distributed throughout the surface of the hard disk. In this way, a very large file can have dozens of parts spread across the surface of the disk. This means that, when we try to access it, the head of the hard disk (which has sequential access) has to move to each of the parts to read it. And this is the main reason why Windows is slow and takes a long time to open files and programs.

To reduce the impact of this fragmentation there is a process called “defragmenting.” Defragmenting a hard disk consists mainly of taking all the fragments of the divided files and placing them in the most consecutive way possible. In this way, when we try to enter them, the hard disk head does not have to move to several different positions, but can read the entire file consecutively.
Defragmenting a hard drive is one of the most basic maintenance tasks. In addition, it is one of the ones that Windows 10 performs automatically without us having to worry about it. Of course, what we should never defragment is an SSD, since we can literally break it.
Why SSDs should not be defragmented
Unlike hard drives (whose head is physically moved to various positions to access files), SSDs have random access . That is, instead of having to move from position 1 to 10 through all positions, SSDs directly access position 10. Therefore, although a file is divided into several smaller parts, this does not affect the performance of the computer, since the access times are the same as if it were all followed.
However, even if the SSDs are not affected by fragmentation and do not have to be defragmented, there are some basic maintenance tasks for these units, such as placing the very divided files consecutively in the less used parts and sorting the most used files for be able to access them more easily.
How to defragment hard drives in Windows 10
Windows has software to defragment files since the time of Windows 95, although it is true that this tool has changed a lot since then until now. Windows 10, of course, has its own software to defragment hard drives. And in addition, this is able to differentiate between normal hard drives and SSD. Thus, the program will keep our hard drives defragmented and SSD optimized without compromising them.
Where is the Windows disk defragmenter
We can reach the Windows 10 disk defragmenter in several ways. For example, we can use the Windows 10 search engine to open this tool by typing “defragment” in it.

And we can also open the properties window of any of the hard drives (or SSD) of our computer. In the “tools” tab we will find this defragmenter.

When we open the tool we will see a window like the following.

As we can see, Windows itself differentiates between solid state drives and hard drives. Hard drives will remain defragmented automatically, while solid state drives, or SSDs, will remain optimized.
The “Analyze” button that appears on the defragmenter helps us to check the fragmentation status of any hard disk (not SSD) that we have connected to the PC. On the other hand, the “Optimize” button allows us to carry out the corresponding task to improve the performance of the unit, according to its type.
How to program automatic defragmentation
In the defragmenter window we have a button called ” Change settings “. From it we will be able to access the few options that this tool has to keep the units optimized and ready to work.

Basically we must look at the ” Scheduled execution “, so that Windows can optimize the units automatically. We will also have the possibility to choose which days of the week we want to optimize the units automatically. And if for some reason the optimization of a unit fails 3 times, the tool will give it priority to try to defragment it or optimize it the next time automatically.
In addition, we will also be able to choose the units we want (or not) to optimize automatically, as well as an option that allows us to choose if we want the new units to automatically optimize.

With this we have already seen everything that the defragmenter of Windows 10 files provides. Although it is true that there are other programs to defragment a little more complete hard drives , the truth is that with the Windows tool, although it is simple, we will have more than enough.