Convert File URL ("file:///C:/") to File Path ("C:\")

cementboot

Newcomer
Joined
Aug 27, 2005
Messages
8
Is there any easy way to convert a string that contains a file URL ("file:///C:/") to file Path ("C:\") in VB .Net?
 
If the string will always start exactly like that you can simply crop the file:/// part off the start of the file using something like the SubString method. I believe .Net can function on path names that contain / the same as if it is a \ but if not you can use the strings Replace function to change them all over.
 
Back
Top