Get true path from localized path in .net

When I open file explorer and search the file, I can get something like:

c:\brugere\willie\skrivebord\stuff

      

Now the parts are "brugere"

and "skrivebord"

are actually folders "users"

and "desktop"

, but if I try to do this:

System.IO.Directory.Exists("c:\brugere\willie\skrivebord\stuff")

      

folder not found since its actual "c:\users\willie\desktop\stuff"

Is there a way to translate the localized path to the actual path? There are a few adverts about how to do the opposite, just not that.

+3
.net


source to share


No one has answered this question yet

Check out similar questions:

2058
How do I get a consistent byte representation of strings in C # without manually specifying the encoding?
1939
Difference between decimal, float and double in .NET?
1270
Why not inherit from List <T>?
946
How to avoid curly braces (curly braces) in a format string in .NET.
890
How can I get the app path in a .NET console app?
841
Sending email in .NET via Gmail
744
Reading settings from app.config or web.config in .net
737
How do I get the path of the assembly that the code is in?
681
.NET String.Format () to add commas to thousands of number places
556
What are the true benefits of ExpandoObject?



All Articles
Loading...
X
Show
Funny
Dev
Pics