How to get directories included in Directory()

Post Reply
User avatar
xProgrammer
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

How to get directories included in Directory()

Post by xProgrammer »

Hi all

xHarbour documentation implies that you add "D" as the second parameter to the call to the Directory() function. This doesn't work. I tried "d" but that didn't work either. Anyone know how?

Thanks
xProgrammer
User avatar
xProgrammer
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Post by xProgrammer »

Please disregard the above - I used *.* when I should have used *.

I should know better at my age!

Regards
xProgrammer
yunbg1
Posts: 107
Joined: Sun Nov 13, 2005 12:40 am
Location: Winnipeg Canada

Re: How to get directories included in Directory()

Post by yunbg1 »

aDir := Directory("/home/", "D",, .t.)

for i := 1 to len(aDir)
if aDir[i, 5] == "D"
? "Directory"
else
? file
endii
next
FWH User
FWPPC User
FWLinux User
Post Reply