469,626 Members | 868 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

Is there anybody how to create hidden folder in public folder or system?

Hello:
Is there anybody how to create hidden folder in public folder or system?

I have a any problem.
I cannot create hidden folder in public or system folder.
Is there anybody who knows the answer to create hidden folder ?
B.R.

Vic
Apr 28 '06 #1
2 1320
"Vic.Dong" wrote:
Is there anybody how to create hidden folder in public folder or system?


Sure!

#using <System.dll>
#using <System.IO.dll>

DirectoryInfo^ di = gcnew DirectoryInfo("C:\\ExistingDir\\HiddenDir");

// Exception handling omitted
di->Create();
di->Attributes = FileAttributes::Directory | FileAttributes::Hidden;

Sean
Apr 28 '06 #2
"Vic.Dong" <do******@drm.net.cn> wrote:

Is there anybody how to create hidden folder in public folder or system?

I have a any problem.
I cannot create hidden folder in public or system folder.
Is there anybody who knows the answer to create hidden folder ?


CreateDirectory( "c:\\Program Files\\FolderX", NULL );
SetFileAttributes( "c:\\Program Files\\FolderX", FILE_ATTRIBUTE_HIDDEN );

Of course, it will still be visible with "dir /a". You don't want to make
a truly hidden folder. Sony learned that lesson the hard way.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Apr 29 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Ramil Domingo | last post: by
6 posts views Thread by Edward | last post: by
1 post views Thread by ~~~ .NET Ed ~~~ | last post: by
2 posts views Thread by freenews.netfront.net | last post: by
4 posts views Thread by I_AM_DON_AND_YOU? | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.