Lockups during defragmenting have resulted in total data loss. Before you ever do that again (defrag) make sure you are ready for the worse outcome.
After that, read my standing answer to defrag issues. Do try this in safe mode AFTER you have secured what you can't lose.
Bob
I am running Windows ME.
When I try to defrag, my computer just freezes up (which I had no problems using this before).
I can Scan Disk with no problems.
What can I do about this?

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic