This version seems to produce output with the latest Dirplus
Code:
$source = "P:\"
? $SOURCE
$folders = dirplus($source,"/ad /s3")
for each $f in $folders
select
case ubound(split(split($f.path,$source)[1],'\')) = 1
? "level - 1 " + $f.path
case ubound(split(split($f.path,$source)[1],'\')) = 2
? "level - 2 " + $f.path
case ubound(split(split($f.path,$source)[1],'\')) = 3
? "level - 3 " + $f.path
endselect
next
;close (2)
endif
I need to capture for ever folder at level 3 its level 1 and 2 sub folders and output to a csv file.
If I am reading this code correctly, then the contents of $source[1] from the split hold the data extracted from $f.path
I would need to put the data into an array such that data[1,x] = level 1, data[2,x] = level 2 and data[3,x] level 3 for every instance of level 3 where x is the line count.
As I am very unsure how the data is being retreived from the UDF; guidance please.