Corrupt Directory and DirectoryInfo

  • Thread starter Thread starter Pete
  • Start date Start date
P

Pete

Sory if this is in the wrong group but wasn't exactly
sure where to post.

I am using the DirectoryInfo class in VB.NET 2003 to
enumerate a filesystem and calculate different statistics
on the file distribution and size, however if there is a
directory or file that is corrupt a mesage box stating
the "The file or directory is corrupt and unreadable
please run chkdsk." The problem is this mesaage box
halts the execution of my program until the ok button is
clicked. Does anyone know how to supress this message.

Thanks
Pete
 
Are you wrapping the code that's accessing the files/directories in a try
catch? If not, I belive you can just eat the exception and processing will
continue as normal.
 
Yes the code is wraped in try/catch, and it isnot
catching the error. It is not like your standard
exception it is just generating that message box and
blocking execution until ok is clicked, my code does not
even have a call to msgbox in it any where.
 
Back
Top