I can do this using command prompt attrib +s +h c:\stock and the directory will be totally hidden from file explorer.
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 attrib command does.
Below is my code :-
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
The equivalent VB.NET of attrib +s +h is
IO.File.SetAttributes("c:\stock", IO.FileAttributes.Hidden Or IO.FileAttributes.System)
(+s is System attribute)
but you have not really made your directory totally hidden because the visualization of System files and directory could be enabled as you enable the visualization of Hidden files and directory.