Page 1 of 1

Limit recursion depth for folderreport()

Posted: 24 Aug 2012 11:55
by highend
Can you please add another parameter to folderreport() to let us choose the exact recursion depth?

E.g.: Like this:

folderreport()
Creates a report on a folder.

Syntax
folderreport([type=dump], [target=clipboard], [folder], [flags], [outputfile], [separator], [depth])

[depth] can be omitted and is only used when [flags] contains "r".

values for depth are:
0 = unlimited
1, 2, ..., x = Step down 1, 2, ..., x subdirectories

If [flags] uses "r" and depth is omitted, 0 (unlimited) is assumed.
This shouldn't break any existing scripts!

I often have to create dynamic reports for deeply nested hierarchies with thousand of files in it but where I only need to step
down 1 or 2 directories deeper, instead of creating a huge list of files, that aren't necessary at all.

Regards,
Highend

Re: Limit recursion depth for folderreport()

Posted: 28 Aug 2012 09:16
by admin
I understand but I can't do it. Lots of core functions would have to be rewritten (and would get -- very slightly -- slower). Too costy.

Re: Limit recursion depth for folderreport()

Posted: 28 Aug 2012 09:59
by highend
Da** ;)

Back to the old behavior (folderreport("dirs"...) foreach loop over relevant subdirs)... *sigh*