PDA

Click to See Complete Forum and Search --> : Folders


CyberCarsten
Nov 6th, 1999, 02:53 AM
Is it possible to hide a directory on the disk??

/ CyberCarsten

Phobic
Nov 6th, 1999, 03:12 AM
Of course! All you need to do is set the folder's properties using the GetAttr Statement if you want to find out if it is currently hidden, and then using the SetAttr Statement to set them.

This example straight out of the vb4 help file:
SetAttr "TESTFILE", vbHidden ' Set hidden attribute.
SetAttr "TESTFILE", vbHidden + vbReadOnly ' Set hidden and read-only

' attributes.

Yonatan
Nov 6th, 1999, 04:06 AM
The problem is, sometimes the user chooses to be able to view hidden directories. In these cases, you have to perform a very special and unique trick to hide them completely.

If you need sample code, well, so do I! :(

------------------
Yonatan
Teenage Programmer
E-Mail: RZvika@netvision.net.il
ICQ: 19552879 (http://www.icq.com/19552879)

CyberCarsten
Nov 6th, 1999, 03:28 PM
Will this also work on the directory and not just the files???

Thanx guys!!

/ CyberCarsten

Phobic
Nov 7th, 1999, 04:49 AM
Yes, my method should; however according to Yonatan, the only way I know how to make a folder hidden from 'show hidden file' type settings, is by deleting it... hehe :)

CyberCarsten
Nov 8th, 1999, 01:12 AM
OK..the folder i invissible, but still accesible...
I wanted it to be like Magic Folders...

/ CyberCarsten

ddivers
Jul 5th, 2001, 01:38 PM
This is an ancient thread!

Good Dreams
Jul 5th, 2001, 01:41 PM
Dont reply to old posts. People get confused.
Just a suggestion.

ddivers
Jul 5th, 2001, 01:42 PM
hmm?