I want to hide a file in c#. I know the file path and can create a FileInfo object.
How can I hide it?
I want to hide a file in c#. I know the file path and can create a FileInfo object.
How can I hide it?
FileInfo f = new FileInfo(myFileName);
f.Attributes = FileAttributes.Hidden;
Try something like this:
FileInfo fi = new FileInfo(somefile);
fi.Attributes = FileAttributes.Hidden;