Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
How To Get a Short Filename from a Long Filename
Article ID: 175512 - View products that this article applies to.
This article was previously published under Q175512
Under certain circumstances, it may be necessary to get the Short Filename equivalent of a file that has a Long Filename. The example below will allow you to select a file that has a Long Filename and return it's Short Filename using the GetShortPathName API Function call.
The following code example includes a function that will convert long filenames into their short filename equivalents and also includes a simple demonstration of the function's use.
For additional information, please see the following article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/154822/EN-US/ )How To Get a Long Filename from a Short Filename
Article ID: 175512 - Last Review: March 11, 2005 - Revision: 3.2