vb.net - Cannot remove the ReadOnly property from folder -
i'm trying remove read-only property of directory can't it.
private _attributes fileattributes = fileattributes.normal private sub removereadonlydirectoryattributes(byval path string) 'check root folder dim di new directoryinfo(path) di.attributes = _attributes 'check sub folders each folder string in directory.getdirectories(path, "*", searchoption.alldirectories) di = new directoryinfo(folder) di.attributes = _attributes next end sub
i have thought code updates attributes normal.
however, when right click on directory see
i have seen posts here on apply method similar
dim di new directoryinfo(path) di.attributes = di.attributes , not fileattributes.readonly
but doesn't either.
i admin of machine.
Comments
Post a Comment