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


source to share





All Articles