Hello,
I posted this in "Wishes" but I realized it might have been the wrong place so I am posting it here as it appears more appropriate.
In short I would like to know if there is a way to show in a single column within a TAB list ONLY the number of files or documents contained in every folder and subfolder in a directory.
There is already a feature that does this in part:
Tools|Configuration|General|Tree and List|Show item count with folder size.
What I am asking is whether "Show item count" can be separated to show on its own column. In other words I would like to be able to show the number of documents in each folder and subfolder without the "folder size" as the latter sometimes takes some time to show up.
Can anyone advise if this feature already exists or a simple script to make it possible?
Thank you.
Files Count on List
Re: Files Count on List
Create a new custom column, and use this variable
https://www.xyplorer.com/release_13.90. ... bleColumns
<prop #ItemCount> unlike the inbuilt column values though, it isn't recursive, if you needed it to be, you can use alternate scripting methods, eg foldersize()https://www.xyplorer.com/release_13.90. ... bleColumns
Re: Files Count on List
I tried to make a custom column with the script line you suggested but I must be doing something wrong.
Could you please list some of the key steps as there are several variables to chose from and I I got a bit lost.
If by recursive you mean that I would want for the number of files to show up all the time yes that's the case
exactly like for instance the "Size" column which shows the exact size of a document so I would like the script
to show the exact number of documents contained in a folder.
Thank you very much.
Could you please list some of the key steps as there are several variables to chose from and I I got a bit lost.
If by recursive you mean that I would want for the number of files to show up all the time yes that's the case
exactly like for instance the "Size" column which shows the exact size of a document so I would like the script
to show the exact number of documents contained in a folder.
Thank you very much.
Re: Files Count on List
That's not what I meant by recursive, anyway if you are happy with the totals in the inbuilt column, then this will display the same:
If you only want the count of files then use this instead:
return eval(foldersize(<cc_item>, "<d>+<f>"));If you only want the count of files then use this instead:
return foldersize(<cc_item>, "<f>");Re: Files Count on List
Worked perfectly, thank you!!!!!

Re: Files Count on List
The short scripts by Jupe are cool; they work, I like them.
I'd like to always have such columns enabled, but I find when switching to the root of a drive with a lot of files, it takes a long time to calculate the data, resulting in a UI delay.
I understand this (it has a lot of work to do), but I'm thinking about lengthening these scripts such that it doesn't do all that work for the root folder, or maybe if it finds more than, say 500 files, it stops and just shows "500+" in the column.
I'd like to always have such columns enabled, but I find when switching to the root of a drive with a lot of files, it takes a long time to calculate the data, resulting in a UI delay.
I understand this (it has a lot of work to do), but I'm thinking about lengthening these scripts such that it doesn't do all that work for the root folder, or maybe if it finds more than, say 500 files, it stops and just shows "500+" in the column.
Re: Files Count on List
Then prepend something like
if regexmatches(<cc_path>, ":\\$") { return "--"; } in front of it?One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club