file and directory attrbutes

G

Guest

Using VB.Net .net 2.0
I am looking for an effecient way to delete a directoy and it contents. The
issue I am facing is there is one or more files and or subdirectory with
files that are marked Readonly. Therefore the system.io directory.delete
throws an exception.
How does one loop thru the directorys and subdirectorys in a given path and
change attributes to remove readonly.
Or is there a different approach that I should use?

thanks from a noob in .net.
 
A

AlexS

You can run attrib.exe to modify attributes of files and directories. Or you
can code similar functionality using File.SetAttributes and
DirectoryAttribue classes
 

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

Top