How to Get Windows 8.3 Short File Names Using FindFirstFileW (UNC) and GetShortPathName (local) in C#

Working with files and directories on Windows, especially on network shares, often leads to issues with long paths. This post explains what Windows 8.3 short paths are, how they work in NTFS, the difference between local and UNC paths, why browsers and some tools fail with long network paths, and how to programmatically obtain short file names for both local and UNC files.