Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Short File name
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00218942
Message ID:
00218951
Vues:
18
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform