Hiding files and folders from the operating system

  • Thread starter Thread starter andrewbb
  • Start date Start date
A

andrewbb

I've noticed a few products that hide folders and I'm curious how this
is implemented.

Can you hook into the shell api or possibly just hide it from Windows
Explorer?
Or do you have to write a file system driver?
 
I've noticed a few products that hide folders and I'm curious how this
is implemented.

Can you hook into the shell api or possibly just hide it from Windows
Explorer?
Or do you have to write a file system driver?

Hidden folders and files use the hidden attribute. You can use a
FileInfo object or the static methods available in File to set it.

Try something like this:
System.IO.File.SetAttributes("foo.bar",
System.IO.FileAttributes.Hidden);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top