Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / June 2006

Tip: Looking for answers? Try searching our database.

Recursive delete for Directory structure with read-only files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter - 12 Jun 2006 11:57 GMT
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
Vadym Stetsyak - 12 Jun 2006 13:13 GMT
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 )

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Cowboy (Gregory A. Beamer) - 12 Jun 2006 13:17 GMT
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.

Signature

Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************

> Hi All -
>
[quoted text clipped - 5 lines]
> Thanks,
> Peter

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.