Help - How to detect corrupted files on HDD

Associate
Joined
23 Mar 2010
Posts
730
So, basically my HDD (which I said I would backup years ago) was dieing on me. losing sector counts by the hour.

luckily I retrieved all the important data before it died on me.

Now, I realised I had copied some corrupted files within the process.

My question is, is there a free file integrity checker tool? to check if the file is corrupted,
as I cannot seem to find any online which checks in batches (folders).

I have a lot of files and going through each one is... tedious. would be great to know.

Thanks.
 
Soldato
Joined
5 Mar 2010
Posts
12,305
I think you're struggling because i doubt something like that exists. How would the tool know that the file has been corrupted without knowing the state of the file before the corruption.

Think how backup applications work, during restore/verification operations, they will verify if this file is the same as the one that has been previously backed up.

You can get software that will create a hash of every file, and then use that after some corruption to verify if it has been damaged. But that obviously requires you to generate the hashes prior to the corruption.
 
Associate
OP
Joined
23 Mar 2010
Posts
730
I think you're struggling because i doubt something like that exists. How would the tool know that the file has been corrupted without knowing the state of the file before the corruption.

Think how backup applications work, during restore/verification operations, they will verify if this file is the same as the one that has been previously backed up.

You can get software that will create a hash of every file, and then use that after some corruption to verify if it has been damaged. But that obviously requires you to generate the hashes prior to the corruption.

Thanks for your reply.
I see what you mean.

But windows has a feature to scan + fix the drive:
ximg_5321ddc4b9a3c.png.pagespeed.gp+jp+jw+pj+ws+js+rj+rp+rw+ri+cp+md.ic.IuuP1B44ys.png


How does that actually determine it that my files are corrupted then? unless it already hashed all my data?

The reason I haven't used this is because I have other files on the drive and already narrowed it down to specific folders (within the backup). and this scan+fix could take a long time (going through the whole drive searching for errors).
 
Soldato
Joined
1 Jun 2013
Posts
9,315
Thanks for your reply.
I see what you mean.

But windows has a feature to scan + fix the drive:

How does that actually determine it that my files are corrupted then? unless it already hashed all my data?

The reason I haven't used this is because I have other files on the drive and already narrowed it down to specific folders (within the backup). and this scan+fix could take a long time (going through the whole drive searching for errors).

Unfortunately, the scan and fix is for filesystem errors, not for data errors inside the files. NTFS doesn't hash files the way you are thinking, so can't detect corrupt data inside correctly written files, let alone correct it. There is ReFS for Windows 10, but you can't use it on boot drives and you probably didn't have it installed. I would guess there is a significant CPU/filesystem overhead to running it as it's meant more for corporate and high availability systems. Otherwise, the only way to detect corruption is to compare the files to a known good backup.

Whatever tool you used to retrieve the data probably marked the files as good as it's now on another file system, so Windows really has no way to know whether the contents of a file contains actual data, or gibberish, because there's no way to tell anything other than the file is correctly part of the filesystem.
 
Associate
OP
Joined
23 Mar 2010
Posts
730
Unfortunately, the scan and fix is for filesystem errors, not for data errors inside the files. NTFS doesn't hash files the way you are thinking, so can't detect corrupt data inside correctly written files, let alone correct it. There is ReFS for Windows 10, but you can't use it on boot drives and you probably didn't have it installed. I would guess there is a significant CPU/filesystem overhead to running it as it's meant more for corporate and high availability systems. Otherwise, the only way to detect corruption is to compare the files to a known good backup.

Whatever tool you used to retrieve the data probably marked the files as good as it's now on another file system, so Windows really has no way to know whether the contents of a file contains actual data, or gibberish, because there's no way to tell anything other than the file is correctly part of the filesystem.

I see, well it occurred when I backed up my HDD (while it was dieing). I used 'windows copying' (robocopy?) which may be the cause. later used syncback to properly do it.


if you still have the bad disk could do some additional diagnosis, to find what sectors were bad and what files occupied those.

http://www.disktuna.com/finding-out-which-file-is-affected-by-a-bad-sector/
https://www.howtogeek.com/173463/ba...get-bad-sectors-and-what-you-can-do-about-it/

Thanks for the advice, I will try it out.
 
Back
Top Bottom