Hide Folder

Hi!

For example. If I want to hide D:/Projects

Is it possible in delphi?
SULTANAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Stuart_JohnsonConnect With a Mentor Commented:
Hi Sultan,

This will set the attributes of the folder to hidden:

SetFileAttributes('D:\Projects', FILE_ATTRIBUTE_HIDDEN);

Be aware that the folder is still "visible" if Explorer is told to show hidden files.

Cheers,

Stu.
0
 
JaymolCommented:
The only way I've found to succesfully hide something in Windows is to move it into a subdirectory of the windows font directory.

eg.. (on WinNT) To hide directory "D:\Projects", move it to "C:\WinNT\Fonts\Projects"

Although this isn't ideal as it isn't really hiding it, and it will show up with a "Find files or folders.." type search, it doesn't show up in "My Computer", no matter what the view options are set to.

Alternatively, if you can get away without doing it in Delphi, have a look at a program called "Magic Folders" which can be found at...

           http://www.pc-magic.com/

It does what you ask, but I don't know how.

Hope this helps,

John.
0
 
Dennis9Commented:
Hi.
There is a place in the registry that u can edit so the folder get invisible - but i just don't know where :<

Dennis
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Rob SiddellCommunity Educator IICommented:
I will do some reading in my registry book to see if i can find something on making folders invisible.

Rob
0
 
Rob SiddellCommunity Educator IICommented:
Well i could tell you how to remove the option to see hidden files/directories and to set the option via your program and what not and how to restore the option, but i'm not seeing how to make it invisible. I will keep looking though.

Rob
0
 
SULTANAuthor Commented:
Good work!

Thanks, SULTAN
0
 
Stuart_JohnsonCommented:
Cheers Sultan.

Stu.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.