[DllImport("kernel32.dll")]
static extern uint GetShortPathName(string lpszLongPath,
[Out] StringBuilder lpszShortPath, uint cchBuffer);
None.
None.
Please add some!
/// <summary>
/// The ToLongPathNameToShortPathName function retrieves the short path form of a specified long input path
/// </summary>
/// <param name="longName">The long name path</param>
/// <returns>A short name path string</returns>
public static string ToShortPathName(string longName)
{
StringBuilder shortNameBuffer = new StringBuilder(256);
int bufferSize = shortNameBuffer.Capacity;
int result = GetShortPathName(longName, shortNameBuffer, bufferSize);
return shortNameBuffer.ToString();
}
Do you know one? Please contribute it!