Find all corrupted files and folders on the hard drive

If your hard drive is on it's last legs developing more and more bad sectors you will start seeing corrupt files and folders. Obviously you should replace such hard drive as soon as possible.

If you have an up to date backup you can simply restore everything to your new hard drive. However if backup is not there, you may want to copy all good files, skipping the corrupted ones. It would also be useful to have list of all corrupted files so you know what exactly you lost.
If you are using online backup service and have large amount of data you can use this method to copy all remaining data to the new hard drive and then restore only corrupted files from the backup.

Windows explorer is simply not good enough for this task, use robocopy instead. Robocopy can easily skip inaccessible/corrupted files and have a text log with all such files.

If you have Windows Vista or Windows 7, robocopy is already on your system. Just open command prompt and type robocopy
If you have Windows XP or older you can download robocopy from here

robocopy "D:" "E:" /E / COPYALL /R:0 /TEE /LOG:"C:\robo-log.txt"
This will copy all data from D: drive to E: drive and save a log file to C:\robo-log.txt

Used options:

"D:" - Source
"E:" - Destination
- copy subdirectories, including Empty ones.
/COPYALL - copy all file info
/R:0 - number of retries - 0. (Skips corrupted files instead of constantly retrying).
/TEE - output to console window, as well as the log file.
/LOG:"C:\robo-log.txt" - path to the log file.

After copying is completed, open the log file, scroll down to the bottom and check the summary for failed files and folders. To find which particular files were corrupted search for "The file or directory is corrupted and unreadable" in the log file. You may also want to search for "Access is denied".


Subscribe to receive occasional updates on new posts.
Your email will not be used for any other purpose and you can unsubscribe at any time.
Please wait