creating a hidden file

  • Thread starter Thread starter wh
  • Start date Start date
W

wh

Is there a way to create a new file as hidden? It appears that a file can be
created and later have it's 'hidden' attribute set by using
File.SetAttribute, but I need to know if it's possible to create a file as
hidden initially.

Thank you,
Wayne.
 
Hi,

Seems that there's no managed way to do it, at least at the first glance.
You can however employ the CreateFile API that allows for specifying file
attributes when you create a new file.
 

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