Click to See Complete Forum and Search --> : How to get the short name of a directory ?


September 6th, 1999, 03:13 AM
If I have a directory with long name (e.g. c:\dir_12345678), how can I get its short name c:\dir_12~1 ?
Is there any function to convert the long name to a short name ?

Thanks.

Oleg Lobach
September 6th, 1999, 03:35 AM
Use GetShortPathName API function,

Good luck,

Oleg.

September 6th, 1999, 04:20 AM
I tried GetShortPathName() before but it only works on file (not directory).
Is this true ?