472,342 Members | 1,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,342 software developers and data experts.

How can I creat hide directory?

Hi EveryBody:

I used vb.Net to creat the foolwoing directory:

Directory.CreateDirectory("C:\windows98\windowsdll \win32app\direction")

but my question is how can I used vb.net to hide the directory?

any help will be appreciated

regard's

Husam
Nov 21 '05 #1
5 9967
JR
Dim diMyDir As New DirectoryInfo(Your DirName)

diMyDir.Attributes = FileAttributes.Hidden
"Husam" <Hu***@discussions.microsoft.com> schreef in bericht
news:EB**********************************@microsof t.com...
Hi EveryBody:

I used vb.Net to creat the foolwoing directory:

Directory.CreateDirectory("C:\windows98\windowsdll \win32app\direction")

but my question is how can I used vb.net to hide the directory?

any help will be appreciated

regard's

Husam

Nov 21 '05 #2
JR
Dim diMyDir As New DirectoryInfo(Your DirName)

diMyDir.Attributes = FileAttributes.Hidden
"Husam" <Hu***@discussions.microsoft.com> schreef in bericht
news:EB**********************************@microsof t.com...
Hi EveryBody:

I used vb.Net to creat the foolwoing directory:

Directory.CreateDirectory("C:\windows98\windowsdll \win32app\direction")

but my question is how can I used vb.net to hide the directory?

any help will be appreciated

regard's

Husam

Nov 21 '05 #3
"Husam" <Hu***@discussions.microsoft.com> schrieb:
I used vb.Net to creat the foolwoing directory:

Directory.CreateDirectory("C:\windows98\windowsdll \win32app\direction")

but my question is how can I used vb.net to hide the directory?


(1) VB.NET's 'SetAttr' and 'GetAttr' functions:

\\\
SetAttr( _
"C:\foo", _
GetAttr("C:\foo") And Not FileAttribute.Hidden _
)
///

(2) 'DirectoryInfo' class:

\\\
Imports System.IO
..
..
..
Dim f As New FileInfo("C:\foo")
f.Attributes = f.Attributes And Not FileAttributes.Hidden
///

(3) 'File' class:

\\\

Imports System.IO
..
..
..
File.SetAttributes( _
"C:\foo", _
File.GetAttributes("C:\foo") And Not FileAttributes.Hidden _
)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #4
"Husam" <Hu***@discussions.microsoft.com> schrieb:
I used vb.Net to creat the foolwoing directory:

Directory.CreateDirectory("C:\windows98\windowsdll \win32app\direction")

but my question is how can I used vb.net to hide the directory?


(1) VB.NET's 'SetAttr' and 'GetAttr' functions:

\\\
SetAttr( _
"C:\foo", _
GetAttr("C:\foo") And Not FileAttribute.Hidden _
)
///

(2) 'DirectoryInfo' class:

\\\
Imports System.IO
..
..
..
Dim f As New FileInfo("C:\foo")
f.Attributes = f.Attributes And Not FileAttributes.Hidden
///

(3) 'File' class:

\\\

Imports System.IO
..
..
..
File.SetAttributes( _
"C:\foo", _
File.GetAttributes("C:\foo") And Not FileAttributes.Hidden _
)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #5
Husam,
As the others suggest, you can set the DirectoryInfo.Attributes to
FileAttributes.Hidden.

Rather then create a folder in what appears to be the Windows System
Directory, I would seriously suggest you consider using the "Program Files"
folder instead.

Something like:

Dim directoryPath As String
directoryPath =
Path.Combine(Environment.GetFolderPath(Environment .SpecialFolder.ProgramFiles),
"windowsdll\win32app\direction")
Directory.CreateDirectory(directoryPath)
Dim info As New DirectoryInfo(directoryPath)
info.Attributes = FileAttributes.Hidden

Note Environment.SpecialFolder has a number of values that represent other
special folders such as the windows installation directory...

Hope this helps
Jay
"Husam" <Hu***@discussions.microsoft.com> wrote in message
news:EB**********************************@microsof t.com...
Hi EveryBody:

I used vb.Net to creat the foolwoing directory:

Directory.CreateDirectory("C:\windows98\windowsdll \win32app\direction")

but my question is how can I used vb.net to hide the directory?

any help will be appreciated

regard's

Husam

Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: NotGiven | last post by:
I have the following at the beginning of the PHP page: <?php require_once('Connections/conn.php'); ?> I want to hide the connection file,...
0
by: Husam | last post by:
Hi EveryBody: I used vb.Net to creat the foolwoing directory: Directory.CreateDirectory("C:\windows98\windowsdll\win32app\direction") but my...
10
by: Rock | last post by:
Hi, I want to create this.. A 2 col table with 3 rows down. In the 1st col I want three thumb size images, 1 in each row When an image is...
3
by: ironpythonster | last post by:
Hi everyone,there is a simply question puzzle me: Under the CPP,where can use the char* to creat a string class for use,but under the .NET...
0
by: dhanuka | last post by:
please i need u are help ! i would like to creat programe can not be affect in end task as we creat program in vb in that program can be remove...
0
by: dhanuka | last post by:
plese!dhanuka@gmail.com i need your help i hop to creat artificial intaligon program dut i have not good in vb i want to creat programe but it is...
1
by: dhanuka | last post by:
hai i hop to creat a program in vb, it must be a registration form through the program we have to add some details for this program Ex - we have...
3
akashazad
by: akashazad | last post by:
Hi guys in my application (VB6.0). I want to creat a folder in to which i want to creat a text file . so is there any one who can give me code...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.