Converting a Short Path Name to a Long Path Name and vice versa

Recently the BCL team posted:

Give me the Short Path/File/Directory names, baby! [Kit George]

Keith Hill inquired recently:

There are times when displaying long paths (like as a menu item) that you would like to display a shortened path.  Since the Win32 API already has a CompactPath API, it would be nice to expose this via the Path class.

We completely agree Keith, this is something we haven't had a chance to get to, but it is on our radar. It won't be available in Whidbey, but keep an eye out for it in the future.

If you want this now, I wrote a GotDotNet sample that adds static methods to convert back and forth between Long and Short path names.