all groups > vb.net > february 2008 >
You're in the

vb.net

group:

How to convert FILE:///<PATH> to just <PATH>, using built-in classes.


Re: How to convert FILE:///<PATH> to just <PATH>, using built-in classes. kimiraikkonen
2/5/2008 12:36:53 PM
vb.net: [quoted text, click to view]

How to convert FILE:///<PATH> to just <PATH>, using built-in classes. Andrew Backer
2/5/2008 6:03:27 PM

I have a few file:///c:/windows/somewhere style uris that I need to convert
to the actual physical path. I am hoping there is a built in way to handle
this.

I know I can do some text replacing and get the path, at least in this case,
but I'd rather not do that if there is something that already does it more
robustly.

// Andre

Re: How to convert FILE:///<PATH> to just <PATH>, using built-in classes. Herfried K. Wagner [MVP]
2/5/2008 7:13:45 PM
"Andrew Backer" <awbacker@gmail.com> schrieb:
[quoted text, click to view]

Take a look at the 'Uri' and 'Path' classes.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Re: How to convert FILE:///<PATH> to just <PATH>, using built-in classes. Cor Ligthert[MVP]
2/6/2008 6:59:14 AM
Andrew,

You can hava a look at the uri, however I would just do
\\\
mystring = mystring.tolower.replace(file:///,"")
///

AddThis Social Bookmark Button