Re: [Re2] Long and short filename by DIR
- Posted by Euman <euman at bellsouth.net> Jan 06, 2002
- 379 views
> ----- Original Message ----- > From: "Gilbert Lemaitre" <lemaitre at adfi.ucl.ac.be> > > I need both name in my programs. How can I get them in WIN32? Hello again, You probably should read this, this extends on what I wrote in the prior post. If a file has a long file name, the complete name appears in the cFileName field, and the 8.3 format truncated version of the name appears in the cAlternateFileName field. Otherwise, cAlternateFileName is empty. As an alternative, you can use the GetShortPathName function to find the 8.3 format version of a file name. DWORD GetShortPathName( LPCTSTR lpszLongPath, // null-terminated path string LPTSTR lpszShortPath, // short form buffer DWORD cchBuffer // size of short form buffer ); Euman