file and directory attrbutes

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
You can run attrib.exe to modify attributes of files and directories. Or you
can code similar functionality using File.SetAttributes and
DirectoryAttribue classes
 
Back
Top