Khoi_Vjz_Boy
Khoi_Vjz_Boy

Reputation: 41

Get full path from shortened path in C#

I have a path in the following format: C:\Program~1\Java\jdk1.7.0_03\bin\java.exe

It works as an environment variable, but it doesnt in C#.

Can someone tell me how to get full path to: C:\Program Files\Java\jdk1.7.0_03\bin\java.exe

Upvotes: 0

Views: 521

Answers (1)

SLaks
SLaks

Reputation: 887405

You're looking for Path.GetFullPath().

Note that using short paths as-is should also work.

Upvotes: 1

Related Questions