Article ID: 160043 - View products that this article applies to.
This article was previously published under Q160043
When you run Disk Defragmenter (Defrag.exe), you may receive the following error message:
Note that the "ID No: DEFRAG005" portion of the error message may be replaced by "ID No: DEFRAG006."
Error Defragmenting Drive <drive>. Windows could not access part of the drive. Click Help and carry out the instructions for running ScanDisk. IMPORTANT: To fix this problem, you must run ScanDisk and choose the Thorough option.
ID No: DEFRAG005
This error occurs when Disk Defragmenter is unable to read from or write to one or more bad sectors on the hard disk. The DEFRAG005 error message is displayed when Disk Defragmenter is unable to write to a sector. The DEFRAG006 error message is displayed when Disk Defragmenter is unable to read from a sector.
Before you attempt to work around this problem, you should first make a backup copy of any important data on your hard disk. After doing so, run ScanDisk (Scandskw.exe) and perform a thorough test on the hard disk. To do so, follow these steps:
Many hard disks have sectors that are unusable. If the sectors have been marked as bad by ScanDisk or another disk tool, Disk Defragmenter displays the sector as a white box with a red line through it. This indicates that the cluster has been marked as bad and cannot be used to store data.
If the disk tool you use is unable to detect bad sectors on your hard disk, or if you do not run a disk tool on a regular basis, unusable sectors that are not marked as bad may exist on the disk. When this occurs, you may not realize that the bad sectors exist until Windows 95 attempts to store data in them. Therefore, it is possible for bad sectors to appear while you are using the drive normally. If bad sectors begin to appear on a regular basis, your hard disk may need to be repaired or replaced.
Note that you may be able to prevent the error message from being displayed by deleting some files on your hard disk, but doing so does not fix the problem that is causing the error message to appear. Disk Defragmenter does not read from unused sectors while defragmenting a drive. Therefore, if an unusable sector that does not contain any data exists on your hard disk, the problem described in this article may not occur.
For help with common system maintenance tasks in Windows Vista, visit the following Microsoft Web page:
Fix problems with common system maintenance tasks
Article ID: 160043 - Last Review: October 29, 2009 - Revision: 2.0
Contact us for more help