number of files in a folder

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
calvin
Posts: 18
Joined: 24 Jan 2006 03:29
Location: San Fernando Valley

number of files in a folder

Post by calvin »

Can XYplorer show me the number of files in a highlighted folder?
calvin

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

Re: number of files in a folder

Post by highend »

Via hovering over its icon:
Configuration | Information | File Info Tips | [x] Show Hover Box

In the size column:
Configuration | General | Tree and List | List | [x] Show item count with folder sizes
Ofc folder size must then be calculated...

In the properties pane:
Configuration | General | Tree and List | List | [x] Show folder size on Properties tab

Via a custom column......
One of my scripts helped you out? Please donate via Paypal

vasya
Posts: 57
Joined: 16 Sep 2019 09:18

Re: number of files in a folder

Post by vasya »

highend wrote: 10 Apr 2019 03:39 In the properties pane:
Configuration | General | Tree and List | List | [x] Show folder size on Properties tab
Via a custom column......
Maybe add files count here ?
Image

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

Re: number of files in a folder

Post by admin »

This can take long.

vasya
Posts: 57
Joined: 16 Sep 2019 09:18

Re: number of files in a folder

Post by vasya »

admin wrote: 30 Sep 2019 11:57 This can take long.
How about View-Details ?

Is it need many time to add up the numbers ? 2+6+4+2 = 14 files
Just checkbox, for people who need it

Image

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

Re: number of files in a folder

Post by admin »

Recursing the folders can take long.

vasya
Posts: 57
Joined: 16 Sep 2019 09:18

Re: number of files in a folder

Post by vasya »

Configuration - General - Tree and List - Always show folder sizes
It already calculates the number of elements. (in subfolders too)
It remains only to show to the user this number without additional calculation

jupe
Posts: 2794
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: number of files in a folder

Post by jupe »

You could do what you are requesting via a script, you'd just need to invoke it by custom toolbar button or shortcut key etc when required, something like the script below should work

Code: Select all

  status "This folder contains " . eval(foldersize(<curpath>, "<d>+<f>")) . " items";
The return for your example wouldn't be 14 though, because you haven't counted the 3 folders pictured, you could adjust the script to match your screenshot value though, it wouldn't take much effort.

vasya
Posts: 57
Joined: 16 Sep 2019 09:18

Re: number of files in a folder

Post by vasya »

jupe wrote: 24 Jan 2020 14:46 via a script
wow, great

Code: Select all

status "This folder contains " . eval(foldersize(<curpath>, "<d>+<f>")) . " items";
status "This folder contains " . eval(foldersize(<curpath>, "<d>")) . " directories";
status "This folder contains " . eval(foldersize(<curpath>, "<f>")) . " files";
status "This folder contains " . eval(foldersize(<curpath>, "<d>")) . " directories and " . eval(foldersize(<curpath>, "<f>")) . " files";

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

Re: number of files in a folder

Post by highend »

Code: Select all

status "This folder contains " . foldersize(<curpath>, "<d> folder(s) / <f> file(s)");
One of my scripts helped you out? Please donate via Paypal

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

Re: number of files in a folder

Post by admin »

Look, I could easily make the Status Bar show the Deep Status if folder sizes are shown. But I personally find it very confusing.
Attachments
DeepStatus.png
DeepStatus.png (30.65 KiB) Viewed 2873 times

vasya
Posts: 57
Joined: 16 Sep 2019 09:18

Re: number of files in a folder

Post by vasya »

highend, beautiful solution
admin wrote: 24 Jan 2020 16:21 Look, I could easily make the Status Bar show the Deep Status if folder sizes are shown.
wow, it's cool!
Where to configure it? (20.60.0400) I do not have that Status Bar Deep Status like on your screenshot. Or is it a your private build on the screenshot?
Tree and List - "Always show folder sizes" + "Show item count with folder sizes" are turned on.
Image
But I personally find it very confusing.
All people are different. What confuses one is to the other very cool. And vice versa
For both types are options and checkboxes in the configuration.

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

Re: number of files in a folder

Post by admin »

I'll add a tweak to the next version:

Code: Select all

StatusBarDeepStatus=1

vasya
Posts: 57
Joined: 16 Sep 2019 09:18

Re: number of files in a folder

Post by vasya »

admin wrote: 27 Jan 2020 12:32 I'll add a tweak to the next version:

Code: Select all

StatusBarDeepStatus=1
Nice, thanks

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

Re: number of files in a folder

Post by admin »

So, anybody likes the Deep Status ? I.e. should that become an option in Configuration?

Post Reply