471,078 Members | 807 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

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

Thanks
Jul 19 '05 #1
8 3749
Hello,

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

DirectoryInfo.Attributes

HTH,
Herfried K. Wagner
--
MVP VB Classic, VB .NET
http://www.mvps.org/dotnet
Jul 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 :-(
Jul 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

Jul 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
Jul 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

Jul 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
Jul 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

Jul 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

Jul 19 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Kali K E | last post: by
3 posts views Thread by Zoool | last post: by
12 posts views Thread by cjw | last post: by
5 posts views Thread by Vicky via DotNetMonster.com | last post: by
reply views Thread by Steve Singer | last post: by
2 posts views Thread by WPW07 | last post: by
reply views Thread by leo001 | last post: by

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.