I have this code that works fine on the local drive:
file.Attributes |= FileAttributes.Hidden;
I've also tried:
System.IO.SetAttributes(file.FullName, FileAttributes.Hidden);
Any suggestions to get set the hidden attribute on the file, for files on a networked drive?
Note: I can set directories to hidden on a networked drive.
Note2: I tried right clicking the file in the directory and setting Hidden, it doesn't stay marked.
PS: I'm using Windows 8 if that makes any difference.