Not sure if this works in VFP 6 but try:
LOCAL oFso,laTemp,lnCount,oFile
DIMENSION laTemp[1,1]
oFso = CreateObject("Scripting.FileSystemObject")
ADIR(laTemp,"*.*")
FOR lnCount = 1 to ALEN(laTemp,1)
oFile = oFso.GetFile(laTemp[lnCount,1])
laTemp[lnCount,2] = oFile.ShortName
NEXT lnCount
FOR lnCount = 1 to ALEN(laTemp,1)
? laTemp[lnCount,1]+" , "+laTemp[lnCount,2]
INKEY(.2)
NEXT lnCount
RELEASE oFso
This gives me the SFN's in VFP8. Don't know about the order, though.
>>You can use ASORT() function after ADIR()
>
>Thanks Borislav
>
>That will sort, which I don't want. Plus I want the default Short File Names by which they are stored in the order they are stored.
Regards,
Mike
"We try to solve the problem by rushing through the design process so that enough time is left at the end to uncover the errors that were made because we rushed through the design process."
- Glenford Myers
If you're going through hell, keep going. - Walt Disney