Check Broken File
-
How can I check file is broken? I want to get alarm when text file or .sdf (database file) file is broken in specified directory. How can I check it in C#? Thanks...
-
How can I check file is broken? I want to get alarm when text file or .sdf (database file) file is broken in specified directory. How can I check it in C#? Thanks...
What do you mean by broken?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me
-
What do you mean by broken?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me
damaged file.
-
damaged file.
You'd need to have something to compare it to; the original, undamaged file then carry out a byte-by-byte comparison. You could create a checksum of the original file and store that then compare that to the checksum of the damaged file. You could also compare file lengths; if they are different then so are the files (obviously). If you don't have the original file to compare to then you might be a bit stuck unless the damage you are looking for is quite specific and testable.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me
-
You'd need to have something to compare it to; the original, undamaged file then carry out a byte-by-byte comparison. You could create a checksum of the original file and store that then compare that to the checksum of the damaged file. You could also compare file lengths; if they are different then so are the files (obviously). If you don't have the original file to compare to then you might be a bit stuck unless the damage you are looking for is quite specific and testable.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me
digital man wrote:
If you don't have the original file to compare to then you might be a bit stuck unless the damage you are looking for is quite specific and testable.
That's testing whether the .sdf has changed, compared to the original. It's probably a SqlCE database, and it's checksum would change on every update/delete.
I are Troll :suss:
-
How can I check file is broken? I want to get alarm when text file or .sdf (database file) file is broken in specified directory. How can I check it in C#? Thanks...