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

Popular posts from this blog

Out of index C/C++ -

regex - PatternSyntaxException: while using String.ReplaceAll function in java? -

java - Projects which are accessed via multiple (different) IDEs: Ant or Maven? -