How can I completely hide a directory in .net vb
<p>I can do this using command prompt <strong>attrib +s +h c:\stock</strong> and the directory will be totally hidden from file explorer.</p>

<p>If however I do it in code like below it will show up the directory if view hidden files is ticked. Can someone tell me how in code i could achieve a total hide of a directory like what the <strong>attrib</strong> command does.</p>

<p>Below is my code :-</p>

<pre><code>Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        IO.File.SetAttributes("c:\stock", IO.FileAttributes.Hidden)

    End Sub
End Class
</code></pre>