Re: How to Get File Path
- From: "vvenk" <vvenk@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 22 Aug 2005 18:33:04 -0700
Tom:
Yours is even simpler.
Venki
"Tom Shelton" wrote:
> In article <#o#N5i1pFHA.2072@xxxxxxxxxxxxxxxxxxxx>, Dustin Wilson wrote:
> > I'm looking for a quick function that will give me just the path for a file.
> > For example if I have the string "C:\Temp\MyFile.txt", I want to just return
> > just the string "C:\Temp\". How is this done using VB.NET?
> >
> > Thanks
> > Dustin
> >
> >
> Imports System.IO
>
> ....
>
> Dim fi As New FileInfo ("C:\Temp\MyFile.txt")
> Console.WriteLine (fi.DirectoryName)
>
> --
> Tom Shelton [MVP]
>
.
- Follow-Ups:
- Re: How to Get File Path
- From: Chris Dunaway
- Re: How to Get File Path
- References:
- How to Get File Path
- From: Dustin Wilson
- Re: How to Get File Path
- From: Tom Shelton
- How to Get File Path
- Prev by Date: Re: Problem trying to determine if a file exists using wildcard
- Next by Date: Re: Question on Panel Object
- Previous by thread: Re: How to Get File Path
- Next by thread: Re: How to Get File Path
- Index(es):
Relevant Pages
|