|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Recursive delete for Directory structure with read-only filesHi 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 Hello, Peter!
P> Is there a way to delete a directory structure with read-only files in P> it? The Directory.Delete() and DirectoryInfo.Delete() methods both throw P> an access violation exception if the directory structure contains P> read-only diles or sub-dirs. have a look at ( http://www.thescripts.com/forum/thread270312.html ) 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. -- Show quoteGregory A. Beamer ************************************************* Think Outside the Box! ************************************************* "Peter" <peter@NO-EMAIL> wrote in message news:%23YskZ6gjGHA.412@TK2MSFTNGP05.phx.gbl... > 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 > |
|||||||||||||||||||||||