Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DOS paths vs. Windows paths
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00810023
Message ID:
00810026
Views:
41
Hi Chris,

You can use GetLongPathName WIN API function to convert short path name into long.
DECLARE INTEGER GetLongPathName IN Kernel32 ;
  STRING lpszShortPath,  STRING @lpszLongPath, INTEGER @cchBuffer
lcShortPath = FULLPATH("")
lcBuffer = SPACE(256)
lnBuffLen = 256
= GetLongPathName(lcShortPath, @lcBuffer, lnBuffLen ) > 0
lcLongPath = LEFT(lcBuffer, AT(CHR(0), lcBuffer)-1)
>I realize this is a rather novice question and something I should know, but...
>
>CD 'c:\really long path name'
>FULLPATH( '' ) returns 'c:\really long path name\'
>
>CD 'c:\really~1'
>FULLPATH( '' ) returns 'c:\really~1\'
>
>I've also tried SYS(2003) with the same results.
>
>I need to get the full (long) path irregardless of how the current directory was set, and I'm sure there's some really simple way of going about it.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform