Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Limiting Folder Depth in Enumerate Files
#4
Anyway, this is where I am now.....

Quote:
str c
if(BrowseForFolder(c "")) out c
str combo.format("%s\*" c)

str test=
1
2
3

str testbucket
foreach testbucket test
Dir d
foreach(d combo FE_Dir 0x1)
str sPath=d.FileName(1)
out sPath
str testfolderpath.format("%s\*%s*" sPath testbucket)
out testfolderpath
Dir d2
foreach(d2 testfolderpath FE_Dir)
str sPathfile=d2.FileName(1)
out sPathfile

The format function takes care of the problem I was having with spath+"\*"

The problem now is that I thought that the enumerate folder would only find files that matched the wildcard so that when str test is at its first member (in this case "1"), then testbucket will =1 which make testfolderpath look for any files with a 1 in the filename within the directory specified in the first folder enumeration. Instead, the above code is resulting in all files being returned from that folder, whether they have a 1 in them or not.

I hope I have explained that ok.

Anyway, thanks for your tips. The combination of figuring out solutions for myself but under your guidance has been both fun and productive.

Stuart


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)