c# - How can I change the hidden attribute on a windows folder using .NET? -
How can I change an attribute on an existing folder?
I have to make this folder and all the files appear in the current one.
C: \ Documents and Settings \% USER% \ appdata
I found this code:
file attribute property = file. GetAttributes (@ "C: \ Documents and Settings \% user% \") "Properties = Extract Properties (Features, FileAttributes.Hidden); Private Static FileAttributes RemoveAttribute (FileAttributes Attributes, FileAttributes attributesToRemove) {Return Attributes & amp; ~ AttributesToRemove;} But this is not working: (
Thanks!
In your code, you are only updating the features variables, but are not actually updating the attributes for the file.
SetAttr Ibutes ('path', attributes)
Comments
Post a Comment