473,325 Members | 2,771 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,325 software developers and data experts.

How to get directory Info(readonly or not...) knowing the full Path???

Thanks
Nov 19 '05 #1
8 9700
Hello,

"Ms.net" <Re**********@IhateSpam.fuck> schrieb:
[Nothing]

DirectoryInfo.Attributes

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
Nov 19 '05 #2
I know the path of my directory.
Now i want to check its attributes.
But there is no function( i do not find) ,which will take path of directory
and return directoryinfo :-(
Nov 19 '05 #3
"Ms.net" <Re**********@IhateSpam.fuck> schrieb
I know the path of my directory.
Now i want to check its attributes.
But there is no function( i do not find) ,which will take path of
directory and return directoryinfo :-(


dim di as new system.io.directoryinfo(yourpath)
msgbox di.attributes
--
Armin

Nov 19 '05 #4
Hello,

"Ms.net" <Re**********@IhateSpam.fuck> schrieb:
I know the path of my directory.
Now i want to check its attributes.
But there is no function( i do not find) ,which will take path of directory and return directoryinfo :-(


\\\
Imports System.IO
..
..
..
Dim di As New DirectoryInfo("C:\.......")
....
///

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
Nov 19 '05 #5
Thanks you to all... :-))

"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:Oq**************@TK2MSFTNGP10.phx.gbl...
Hello,

"Ms.net" <Re**********@IhateSpam.fuck> schrieb:
I know the path of my directory.
Now i want to check its attributes.
But there is no function( i do not find) ,which will take path of

directory
and return directoryinfo :-(


\\\
Imports System.IO
.
.
.
Dim di As New DirectoryInfo("C:\.......")
...
///

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet

Nov 19 '05 #6
Hello,

"Ms.net" <Re**********@IhateSpam.fuck> schrieb:
i shared a folder and set access to FULL, Read ,write
is set to TRUE from windows.
TempPath="\elysee\mysharefolder"
Dim mydir As DirectoryInfo = New irectoryInfo(TempPath)

If mydir.Attributes.ReadOnly Then Throw New Exception ("read only
directory")

But the exception is throw......WHY???


Untested:

\\\
If (MyDir.Attributes And FileAttributes.ReadOnly) =
FileAttributes.ReadOnly Then
...
End If
///

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
Nov 19 '05 #7
"Ms.net" <Re**********@IhateSpam.fuck> schrieb
Strange.

i shared a folder and set access to FULL, Read ,write is set to TRUE
from windows.
TempPath="\elysee\mysharefolder"
Dim mydir As DirectoryInfo = New irectoryInfo(TempPath)

If mydir.Attributes.ReadOnly Then Throw New Exception ("read only
directory")

But the exception is throw......WHY???


Enable option strict in the project's properties and you'll see why it does
not work.
--
Armin

Nov 19 '05 #8
IT WORK.
THANKS U

"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:OI**************@TK2MSFTNGP09.phx.gbl...
Hello,

"Ms.net" <Re**********@IhateSpam.fuck> schrieb:
i shared a folder and set access to FULL, Read ,write
is set to TRUE from windows.
TempPath="\elysee\mysharefolder"
Dim mydir As DirectoryInfo = New irectoryInfo(TempPath)

If mydir.Attributes.ReadOnly Then Throw New Exception ("read only
directory")

But the exception is throw......WHY???


Untested:

\\\
If (MyDir.Attributes And FileAttributes.ReadOnly) =
FileAttributes.ReadOnly Then
...
End If
///

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet

Nov 19 '05 #9

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

Similar topics

9
by: Jean-Marc Molina | last post by:
Hello, I can't find a way to execute a Windows application, whose directory path contains blank spaces, from a PHP script. I also wonder if the problem happens under Linux and other OS. ...
3
by: Kali K E | last post by:
Hi, I could not understand how I can do the following things in Python. Please help me. 1. First I have to find the current directory from where the script is invoked. 2. Next I have to form a...
3
by: Zoool | last post by:
Hi, Is there a way to know the main directory path of a user session? I mean the "C:\Documents and Settings\username" Directory of the user logged into a windows session. In .NET you can do...
3
by: Alan Howard | last post by:
Hi there, I can't seem to find any info on this error message that's generated when sending email with CDO: "The pickup directory path is required and was not specified" Does anyone know...
12
by: cjw | last post by:
Pl help me with this simple question. I am using an array to store the file name, eg. char in = "filename.bmp"; How can I give the directory path with the file name?
5
by: Vicky via DotNetMonster.com | last post by:
Please help to put directory path to app.config file! //DirectoryInfo di = new DirectoryInfo("C:\\Vicky Development\\FundExplorer\ \Index\\Copy of IntlIndex"); //string dipath = @"C:\Vicky...
0
by: Steve Singer | last post by:
Hello. I would like to find the name of the virtual directory and the directory path of the website from a business class which the website uses. I can't figuire out what the code would be? Any...
2
by: enrique | last post by:
Hello everyone, I'm looking for a "directory path" solution that will allows me to test my app locally and then test on remote web server without having to update my web.config file each time I...
1
by: Austere | last post by:
Hi, Could anyone help? I need to use the directory path where the application is stored. In VB it can be done using My.Application.Info.DirectoryPath What's the alternative in VC++?? Thanks in...
2
by: WPW07 | last post by:
Hello, I have a script that lists the contents of a directory. It was working properly until we had to change the directory that it reads from. The path to this script is: ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.