如何更改现有文件夹的属性?
我必须使这个文件夹和其中存在的所有文件可见。
C:\Documents and Settings\%USER%\appdata
我找到了这段代码:
FileAttributes attributes = File.GetAttributes(@"C:\Documents and Settings\%user%\Dane aplikacji");
attributes = RemoveAttribute(attributes, FileAttributes.Hidden);
private static FileAttributes RemoveAttribute(FileAttributes attributes, FileAttributes attributesToRemove)
{
return attributes & ~attributesToRemove;
}
但它不工作:(
谢谢 !