473,385 Members | 1,898 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,385 software developers and data experts.

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

Thanks
Jul 19 '05 #1
8 3802
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 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: ...
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...
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.