Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to convert long file name to 8 character DOS name
Message
 
To
06/02/2003 00:13:49
Hee Lim Wang
Fantasy Software Enterprise
Malaysia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00749714
Message ID:
00749726
Views:
22
I just figured this out a few days ago, as I had the same need, but you should check it first.

PROCEDURE ShortPathName
PARAMETERS pLongPath

* Uses WINAPI to get DOS8.3 type name

DECLARE INTEGER GetShortPathName IN kernel32;
STRING @ lpszLongPath,;
STRING @ lpszShortPath,;
INTEGER cchBuffer

LOCAL lclBuffer, lLen

lclBuffer=SPACE(250)+CHR(0)
lLen=GetShortPathname(pLongPath+CHR(0), ;
@lclBuffer,250)

RETURN left(lclBuffer,lLen)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform