Information générale
Catégorie:
Fonctions Windows API
>>Does anyone know an easy way yo use the APIs to retrieve file names in their "true" case (upper and lower, the same way we see them in Windows Explorer)? I want essentially the functionality that ADIR() achieves, but that VFP function returns all upper case.
>>
>>TIA,
>>
>>-- Randy
>
>Randy,
>
>Try this:
>
>DECLARE SHORT GetFileTitle IN COMDLG32;
> STRING @lpszFile, STRING @lpszTitle, SHORT cbBuf
>
>lpszFile is the file or directory name you want the actual case for.
>lpszTitle is a buffer large enough to hold the information.
>cbBuf is the size of the buffer.
>
>For example:
>
>lcfile = "C:\ANYFILE.TXT"
>lcbuffer = SPACE(200)
>lnsize = LEN(lcbuffer)
>= GetFileTitle(@lcfile, @lcbuffer, lnsize)
>
>With directories, be sure to strip off the end backslash if it exists.
George,
Looks promising. I take it you would just continue using ADIR() and then calling this function for each file in the array. That should be fast enough.
Thanks for the reply.
-- Randy
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement