For getting short path name you have to can un-managed API
GetShortPathName
public static string GetShortName(string sLongFileName) {
var buffer = new StringBuilder(259);
int len = GetShortPathName(sLongFileName, buffer, buffer.Capacity);
if (len == 0) throw new System.ComponentModel.Win32Exception();
return buffer.ToString();
}
[DllImport("kernel32", EntryPoint = "GetShortPathName", CharSet = CharSet.Auto, SetLastError = true)]
private static extern int GetShortPathName(string longPath, StringBuilder shortPath, int bufSize);
Below provided links can provide you more help
http://stackoverflow.com/questions/2585171/getshortpathnamea-not-working-in-c-sharp[
^]
http://www.pinvoke.net/default.aspx/kernel32.GetShortPathName[
^]