Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can i have all subfolders from a folder ?
Message
From
09/01/2003 07:57:02
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
09/01/2003 06:17:24
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00739719
Message ID:
00739743
Views:
11
>how can i have all subfolders from a folder ?
>exemple from program files folder i want to have all subforlder in it.

This one uses adir() with recursion :
lparameters tcPath
create cursor dirlist (dirname m)
GetSubDirs(tcPath)
browse

function getsubdirs
lparameters tcPath
local lcCurDir, lnSubDirs, ix
local array laDirs[1]
lcCurdir = ADDBS(tcPath)
insert into dirlist values (lcCurdir)
lnSubdirs=adir(laDirs,lcCurdir+"*.*","D")
for ix = 1 to lnSubDirs
    if laDirs[ix,1]#"." AND "D"$laDirs[ix,5]
       	=getsubdirs(lcCurdir+laDirs[ix,1])
    endif
endfor
For another solution using FSO check Message #633356
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform