473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 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 10031
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, "conn.php", so it's out of the web accessible 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 question is how can I used vb.net to hide the...
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 rolled on, the larger image shows up in col 2
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 Framework? How to use C# to creat a string class as the...
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 through end task program so i need the program to...
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 hase to be easy and can be undestand well need...
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 to add some persons details i can creat that...
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 for that . ...
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 java so that you can conceal sensitive information...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.