From: CM on
Is there any way to do a disk check on just one file?

For example, to detect if a particular file is affected by bad sectors
without scanning the entire file system?
From: Arne Vajhøj on
On 11-03-2010 21:56, CM wrote:
> Is there any way to do a disk check on just one file?
>
> For example, to detect if a particular file is affected by bad sectors
> without scanning the entire file system?

Read all bytes of the file?

Arne

From: Mike Lovell on
> Is there any way to do a disk check on just one file?
>
> For example, to detect if a particular file is affected by bad sectors
> without scanning the entire file system?

Now that is an unusual request. I'm going to say no, not from C#. And
pretty complicated from C++.

I'm really not sure to its application, if you have hard drive you know has
a certain amount of bad sectors on it, for starters you want to stop using
it. Just running a chkdsk and it telling you there are bad sectors should
be enough for you to shift off off it, without worrying about the individual
files effected (which chkdsk will tell you anyhow).

What's the scenario and application you're looking to apply this to?
Perhaps there's a better method.


--
Mike
GoTinker, C# Blog
http://www.gotinker.com