Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Short File name
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00218942
Message ID:
00218951
Views:
20
>Hi,
> Is there any command or function to convert long filename or path to short file name??? e.g. table of contents.doc -> tableo~1.doc
>Thank you

Hi John,

Try:
DECLARE INTEGER GetShortPathName IN Win32API;
  STRING @lpszLongPath,	STRING @lpszShortPath,;
  INTEGER cchBuffer
* lclongpath is the long filename
lcshortpath = SPACE(260)
lnbuffer = LEN(lcshortpath)
lnbuffer = GetShortPathName(@lclongpath, @lcshortpath, lnbuffer)
IF lnbuffer > 0
  lcshortpath = LEFT(lcshortpath, lnbuffer)
ENDIF
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform