473,779 Members | 2,047 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I creat hide directory?

Hi EveryBody:

I used vb.Net to creat the foolwoing directory:

Directory.Creat eDirectory("C:\ windows98\windo wsdll\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 10059
JR
Dim diMyDir As New DirectoryInfo(Y our DirName)

diMyDir.Attribu tes = FileAttributes. Hidden
"Husam" <Hu***@discussi ons.microsoft.c om> schreef in bericht
news:EB******** *************** ***********@mic rosoft.com...
Hi EveryBody:

I used vb.Net to creat the foolwoing directory:

Directory.Creat eDirectory("C:\ windows98\windo wsdll\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(Y our DirName)

diMyDir.Attribu tes = FileAttributes. Hidden
"Husam" <Hu***@discussi ons.microsoft.c om> schreef in bericht
news:EB******** *************** ***********@mic rosoft.com...
Hi EveryBody:

I used vb.Net to creat the foolwoing directory:

Directory.Creat eDirectory("C:\ windows98\windo wsdll\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***@discussi ons.microsoft.c om> schrieb:
I used vb.Net to creat the foolwoing directory:

Directory.Creat eDirectory("C:\ windows98\windo wsdll\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.H idden _
)
///

(2) 'DirectoryInfo' class:

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

(3) 'File' class:

\\\

Imports System.IO
..
..
..
File.SetAttribu tes( _
"C:\foo", _
File.GetAttribu tes("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***@discussi ons.microsoft.c om> schrieb:
I used vb.Net to creat the foolwoing directory:

Directory.Creat eDirectory("C:\ windows98\windo wsdll\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.H idden _
)
///

(2) 'DirectoryInfo' class:

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

(3) 'File' class:

\\\

Imports System.IO
..
..
..
File.SetAttribu tes( _
"C:\foo", _
File.GetAttribu tes("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.A ttributes 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(En vironment.GetFo lderPath(Enviro nment.SpecialFo lder.ProgramFil es),
"windowsdll\win 32app\direction ")
Directory.Creat eDirectory(dire ctoryPath)
Dim info As New DirectoryInfo(d irectoryPath)
info.Attributes = FileAttributes. Hidden

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

Hope this helps
Jay
"Husam" <Hu***@discussi ons.microsoft.c om> wrote in message
news:EB******** *************** ***********@mic rosoft.com...
Hi EveryBody:

I used vb.Net to creat the foolwoing directory:

Directory.Creat eDirectory("C:\ windows98\windo wsdll\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
1489
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 structure. I understand putting them in the php include directory shoudl do this. For example, let's say the directory I put them in is /www/phpIN/, and /www/ht/ is the root web directory. So I put "conn.php" in the inlcude directory...
0
322
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 directory? any help will be appreciated
10
4723
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
1403
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 BCL suppert?? It can do this work? PS: I read from the code of SSCLI,It is found that when BCL implent the string ,it calll for an model of the runtime lib.
0
1167
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 creat can not be do any thing using end task funtion thank u dhanuka(basic vb user )
0
1006
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 some help requester
1
2772
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 part but i have no any idea about how that detail save and how it add for my program Ex - need to save all the detail and as we whish want to display it agin as the definition it has thes conditions 1.to save all the persons details 2.as we...
3
9682
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 . thankx in advance
0
10782
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 inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not a new concept, there is a concept called Steganography which enables to conceal your secret...
0
9471
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8958
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7478
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5501
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4036
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3631
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2867
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.