Item count custom column with pattern match
-
Millzey
- Posts: 169
- Joined: 07 Oct 2011 15:10
Item count custom column with pattern match
If there an efficient way to list the item count of say 500 folders (less than 20 files in each) in a custom column with a pattern match or exclusion with the current functions? I dont know if report/folderreport would be the proper choice, but I'd like to have a column that didnt rely upon populating a tag that showed a count of only files that matched or excluded a particular pattern. I was hoping the Ghost Filter applied to the item count of the size column or the foldersize function but it doesnt
-
Millzey
- Posts: 169
- Joined: 07 Oct 2011 15:10
Re: Item count custom column with pattern match
Ok I found listfolder function and is has a pattern parameter, in figured it'd be the most efficient, but does it support multiple patterns? I'd like to filter all *.mp3 and *.flac for example for an item count column. Will I have to use 2 listfolder calls and combine the count?
-
highend
- Posts: 15004
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Item count custom column with pattern match
If there are no subfolders involved,
or
You need to test yourself, which version is faster...
Code: Select all
return listfolder(<cc_item>, "*.mp3", 1 + 32) + listfolder(<cc_item>, "*.flac", 1 + 32);Code: Select all
return gettoken(quicksearch("*.mp3 OR *.flac", <cc_item>), "count", <crlf>);One of my scripts helped you out? Please donate via Paypal
-
Millzey
- Posts: 169
- Joined: 07 Oct 2011 15:10
Re: Item count custom column with pattern match
Thank you very much
XYplorer Beta Club