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

enter image description here

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

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -