Recursive delete for Directory structure with read-only files

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hi All -

Is there a way to delete a directory structure with read-only files in it?
The Directory.Delete() and DirectoryInfo.Delete() methods both throw an
access violation exception if the directory structure contains read-only
diles or sub-dirs.

Thanks,
Peter
 
Process object with "RMDIR /S /Q". Will delete the entire directory
structure and it will not ask you anything. Be careful with the power. :-)

Will have to look at .NET objects for an alternative.

--
Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************
 
Back
Top