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.
 
Back
Top