You can't defragment files that are in use. When Windows is running, MANY files are in constant use. An NTFS drive have a journal file/area. It don't show and can't be moved as it is constantly in use.
To get a total defragmentation, you need to scedule a boot time defragmentation. That kind of defragmentation benefit from the fact that it's performed when the OS is NOT loaded and NO files are in use.
A boot time defragmentation often takes several hours. You must sedule it when you KNOW that you won't need the computer that day and maybe the next...
Also, if the drive is heavily fragmented and have very little free space, the process will take a long time and it may prove impossible to totaly defragment it.
In this case, you may find it usefull to move some large files to some external drive as well as empty the trash and suppress an many junk files as possible.
Take a look in your trash. Do you see any folder named with a long string of random characters? Those are parasitic leftovers from previous repairs and reinstalls. It holds the content of the previous trash(s), you can't see the files they contain and can't retreive them.
If a drive have been migrated from another computer, you also get those. (I have a drive that's been in use from Windows 98, ME, 2000 and XP, in 3 different computers, that had some 7 such trash folders...)
DELETE any of those you may find.