For the moment, stop worrying about defrag not working and begin worrying about CHKDSK not working, which is often a symptom of something far more serious.
Try runnning CHKDSK C: /R form the XP recovery console, which can be initiated form the XP CDROM (if you have one) or from the floppy disk set called "setup disks".
Here are some links about the recovery console:
http://www.wown.com/j_helmig/wxprcons.htm
http://www.xxcopy.com/xxcopy33.htm (near bottom)
http://www.kellys-korner-xp.com/win_xp_rec.htm
http://support.microsoft.com/kb/314058
If the recovery console asks for a password, it is the password used to install XP, not the password of any random person with administrator privileges. It is usually blank, meaning just hit return. You can bypass the request for a password in the recovery console by the following registry change, made from within windows:
Instead, just run REGEDIT and change two things that appear on the same page:
Start à Run à Regedit
Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Setup\RecoveryConsole
Set the DWORD SecurityLevel value to 1
Exit REGEDIT, insert the XP CDROM or 1st floppy disk, then reboot into the recovery console.
Caution: If you are using an XP CDROM, avoid a "repair" installation. Read links above for detailed steps.
If CHKDSK in the recovery console can not fix the file system, then it is possible that you have a bad/failing hard drive. Test it with tools available free form the drive maker. These usually are downloaded an burned to a CD, although older versions might result in bootable floppies. If the download is an ISO file, be sure to use CD writing software that supports burn-form-image, such as Nero or Easy CD Creator. The XP default software will not do this.
If the hardware tests OK, but CHKDSK still fails, then it might be time to re-install XP, and thenb all programs. That is do a long-format, and start over.
Obviously, given that you have some disk or file system problem, it would be a very good idea to backup all personal files off of the PC as fast as possible. Use CD, DVD, or even external USB or firewire. While in theory a flash drive would work, they are less reliable than the other options. I also rate floppies and ZIP cartridges as somewhat less reliable, and floppies are too small to really be of use any more.