I would like to change folder attribute from Read Only!
Anyone that knows how to do that in VB.net, please?
Printable View
I would like to change folder attribute from Read Only!
Anyone that knows how to do that in VB.net, please?
What I really want to do is to delete folder but I guess I have to change the ReadOnly attribute first.
Hi.
The DirectoryInfo class has an attributes property that you can manipulate.
To remove the ReadOnly attribute use this:
VB Code:
Dim d As New IO.DirectoryInfo(MyFolder) d.Attributes = d.Attributes And Not FileAttributes.ReadOnly
But when I copied your code, my system complains that:
FileAttributes.ReadOnly is not declared.
Any ideas?
Imports System.IO solved that problem....
/Anders