Limit recursion depth for folderreport()

Features wanted...
Post Reply
highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Limit recursion depth for folderreport()

Post 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
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 64877
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Limit recursion depth for folderreport()

Post 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.

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Limit recursion depth for folderreport()

Post by highend »

Da** ;)

Back to the old behavior (folderreport("dirs"...) foreach loop over relevant subdirs)... *sigh*
One of my scripts helped you out? Please donate via Paypal

Post Reply