|
-
Apr 27th, 2004, 04:20 AM
#1
Thread Starter
Member
How to change folder attribute?
I would like to change folder attribute from Read Only!
Anyone that knows how to do that in VB.net, please?
-
Apr 27th, 2004, 04:31 AM
#2
Thread Starter
Member
step 2
What I really want to do is to delete folder but I guess I have to change the ReadOnly attribute first.
-
Apr 27th, 2004, 04:32 AM
#3
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
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
Apr 27th, 2004, 05:18 AM
#4
Thread Starter
Member
thanks
But when I copied your code, my system complains that:
FileAttributes.ReadOnly is not declared.
Any ideas?
-
Apr 27th, 2004, 05:22 AM
#5
Thread Starter
Member
sorry
Imports System.IO solved that problem....
/Anders
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|