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!
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top