public static void SetAttributes(string fileName, FileAttributes attr) { File.SetAttributes(fileName, File.GetAttributes(fileName) | attr); }