I have been looking for .NET to get the function of the short message name or path, maybe I haven't found one yourself. I am implemented by calling the WinAPI function .1. Declaration GetshortPathnamea [DLLIMPORT ("kernel32.dll", entrypoint = "getshortpathnamea ")] private static extern int GetShortPathName (string lpszLongPath, StringBuilder lpszShortPath, int cchBuffer); 2 write code, as follows:. string fileDirectory = @" C: / Program Files "; StringBuilder sPath = new StringBuilder (fileDirectory.Length); GetShortPathName (FileDirectory, FileDirectory .length); FileDirectory = spath.toString ();