General information
Category:
Windows API functions
>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
Why don't you convert the names after you run the ADIR
LOCAL lnTotFiles, lnCurr, lcFile, lnPos
DECLARE aProper[1]
lnTotFiles =ADIR( aFiles )
DIMENSION aProper[ lnTotFiles ]
FOR lnCurr = 1 to lnTotFiles
lcFile = aFiles[lnCurr,1]
* strip the extension
lnPos = AT( ".", lcFile )
lcFile = IIF( lnPos # 0, SUBS( lcFile, 1, lnPos-1 ), lcFile )
aProper[ lnCurr ] = lcFile
ENDFOR
RELEASE aFiles
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only