Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
V6s5 - Can ADIR() return both Short and Long File names
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00871673
Message ID:
00871941
Views:
24
This message has been marked as the solution to the initial question of the thread.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform