Note that none of this should normally be done with a SSD, they work differently to spinning HDDs.
SSDs should be Optimised and not defragmented (or consolidated).
So as long as we are talking about a HDD then:
What you are looking for is the 'Holy Grail' of hard drive consolidation - it can hardly ever be achieved.
You can get close, but there is usually something that Windows says can't be moved. (For example the Windows pagefile stays in a set location on disc, as do some other files).
To try and achieve it though what you need is drive consolidation rather than file defragmentation.
Confusingly although they are different processes and do very different things most people still call both of them 'defragging'.
There are historic reasons for that, in the days when discs had much less capacity than they do now consoildation then was normally what was wanted, so it's what 'defragmenters' did (and still do).
With todays larger capacity drives consolidation is not that important, there is usually plenty of free space so it's more advantageous to have the files in one piece and not to care too much about where they are physically located on the disc.
(PS. You may have noticed that the Windows built in defragmenter/optimiser no longer even shows a 'drive map' of where the files are, that's simply because it's no longer that important where files are on the disc).
So, How to (try and) do it with Defraggler:
By default Defraggler does a mixture of both defragmentation and consolidation as it sees being the best for your drive, but you can make it do either one or the other.
To do a whole disc consolidation of a HDD and attempt to get your files all at the start of the disc/partition what you need is the 'Defrag Freespace' option which can be found on the menu under Action>Advanced.
![image.png]()
Note that there are 2 options there - 'Defrag Freespace' and 'Defrag Freespace (allow fragmentation)'.
The first tries to put all your files in the smallest number of clusters while keeping the files themselves in one piece.
The second one allows files to be packed-in to the available clusters by fragmenting some files to fill up empty space in the clusters - so although you will get them into the least number of clusters that is at the expense of some files being fragmented to fill the clusters completely.
Also note that this process can take a long time, especially if your drive is 500GB or bigger - that's another reason why consolidation is not done much with todays larger capacity drives, it just takes so long.
Again though, having said all that, what you are looking to achieve is something that is rarely ever accomplished.
You may get close with a few runs of 'Defrag Freespace (allow fragmentation)', if you have the time, but there will always be some files that Windows won't allow to be moved.
And also note that as soon as you use your computer the files will start getting fragmented again as Windows and yourself use them.