PathCompactPathEx is a bool Shell Lightweight Utility Function that is available in the Windows shell. //Using using System.Runtime.InteropServices; //DLLImport -- Calling Native Function [DllImport("shlwapi.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern bool PathCompactPathEx( System.Text.StringBuilder pszOut, string pszSrc, Int32 cchMax, Int32 dwFlags); //The text to Compact string strLong = "C:\Program Files\EggHeadCafe\Publicati0ns\Today\Present.txt"; StringBuilder sbShort = new StringBuilder(260); bool returnValue = PathCompactPathEx(sbShort , strLong , 20+1, 0); //Shows Short Text with 20 Characters txtShort.Text = sbShort .ToString();