Folder File Count Column?
Folder File Count Column?
Fellow Forum Members,
I'm using XYplorer and I can't seem to setup a column that will list the quantity of files contained within each folder. My goal is to sort a bunch of folders only by the quantity of files contained within each folder. Is it possible to setup such a column in XYplorer because I don't see such an option available as shown in the screen capture below:
I'm using XYplorer and I can't seem to setup a column that will list the quantity of files contained within each folder. My goal is to sort a bunch of folders only by the quantity of files contained within each folder. Is it possible to setup such a column in XYplorer because I don't see such an option available as shown in the screen capture below:
Re: Folder File Count Column?
Afaik not possible...
A (manual) workaround:
A script that counts all files in all current subfolders, stores the count in a tag associated to each folder and then you can sort by tag...
Ofc you have to rerun that script when necessary...
@Don:
How about a feature that executes script on specific times / events, something like a scheduler for scripts?
So sad that we can't run several scripts at the same time...
A (manual) workaround:
A script that counts all files in all current subfolders, stores the count in a tag associated to each folder and then you can sort by tag...
Ofc you have to rerun that script when necessary...
@Don:
How about a feature that executes script on specific times / events, something like a scheduler for scripts?
So sad that we can't run several scripts at the same time...
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 65546
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Folder File Count Column?
Well, you can come close if you tick Configuration | Tree and List | List | Show item count with folder sizes. But the sorting will not work.
>So sad that we can't run several scripts at the same time...
Well, true multi-threading is coming to XYplorer, so there is a lot of hope here...
>So sad that we can't run several scripts at the same time...
Well, true multi-threading is coming to XYplorer, so there is a lot of hope here...
FAQ | XY News RSS | XY X
Re: Folder File Count Column?
Thanks to all for your post.
I'm surprised an app like XYplorer with all of the high level things it can do misses the mark when it comes to offering a way to sort folders by the amount of items contained in a folder.
Highend, do you know if the script you mention exists somewhere in this forum? I would really like to add it to my collection of scripts. One of which you were so kind enough to help me out with in some other thread I posted. If the script you mention does not exist anywhere, would you again be so kind enough to post it in this thread? I'm sure everyone that uses XYplorer will appreciate it a lot because it is very helpful to have the ability to sort folders by the quantity of items it contains within. Thank you in advance.
I'm surprised an app like XYplorer with all of the high level things it can do misses the mark when it comes to offering a way to sort folders by the amount of items contained in a folder.
Highend, do you know if the script you mention exists somewhere in this forum? I would really like to add it to my collection of scripts. One of which you were so kind enough to help me out with in some other thread I posted. If the script you mention does not exist anywhere, would you again be so kind enough to post it in this thread? I'm sure everyone that uses XYplorer will appreciate it a lot because it is very helpful to have the ability to sort folders by the quantity of items it contains within. Thank you in advance.
Re: Folder File Count Column?
It creates values for all folders (recursively) in the current tab's path.
Ofc it's a total countbut none of the accounted subfolders get's a value as well.
I'm using the comments field instead of a tag. No need to parse existing tag entries...
Atm this script does only work with a non localized XYplorer... but ofc it could be "translated" as well...
1. Edit: Made it multiple times faster by using a dump with some regexes / calculating...
2. Edit: Runs on XY with either english / german language
3. Edit: Using the tags instead of comment field. Be careful, tags are overriden!
Current version v2013.12.24.11.56.22
Ofc it's a total count
1. Edit: Made it multiple times faster by using a dump with some regexes / calculating...
2. Edit: Runs on XY with either english / german language
3. Edit: Using the tags instead of comment field. Be careful, tags are overriden!
Current version v2013.12.24.11.56.22
One of my scripts helped you out? Please donate via Paypal
Re: Folder File Count Column?
For the people still interested in the count of items in a folder; with the new Custom Columns feature, I was able to implement this using a simple script like so:
I'm completely new to scripting in XYplorer, so I'm open to suggestions if there is a quicker or better way to accomplish this.
Edit: changed the format from "Text" to "Number".
I'm completely new to scripting in XYplorer, so I'm open to suggestions if there is a quicker or better way to accomplish this.
Edit: changed the format from "Text" to "Number".
-
Sander Bouwhuis
- Posts: 246
- Joined: 10 Jun 2008 15:40
- Location: Netherlands
Re: Folder File Count Column?
Ok, I might be a complete idiot, but how do I use the 'File count' property?
Although the script the guy above me wrote works, I'd prefer to use the built-in routine.
Caption : Tot Files
Type : Property
Property : File count
Format : Number
Trigger : Browse
Item type : Folders
Item filter :
But, nothing happens. I don't see the file count.
Also:
How do I get the amount of bytes in a folder? I want to replace the current Size column and split them in two.
1. A column named Tot Files which counts the amount of files in the directory.
2. A column named Size which counts the amount of bytes in the directory or file.
Although the script the guy above me wrote works, I'd prefer to use the built-in routine.
Caption : Tot Files
Type : Property
Property : File count
Format : Number
Trigger : Browse
Item type : Folders
Item filter :
But, nothing happens. I don't see the file count.
Also:
How do I get the amount of bytes in a folder? I want to replace the current Size column and split them in two.
1. A column named Tot Files which counts the amount of files in the directory.
2. A column named Size which counts the amount of bytes in the directory or file.
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
-
admin
- Site Admin
- Posts: 65546
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Folder File Count Column?
Conc. the 'File count' property: it does not work here either. No idea why. These properties are hardly documented by MS.
How do I get the amount of bytes in a folder?
Look at SC FolderSize()...
How do I get the amount of bytes in a folder?
Look at SC FolderSize()...
FAQ | XY News RSS | XY X
-
Sander Bouwhuis
- Posts: 246
- Joined: 10 Jun 2008 15:40
- Location: Netherlands
Re: Folder File Count Column?
I tried Foldersize(), but couldn't get it working.
Can you tell me which settings/scriptlines I need to do to get the two columns I described in my previous post?
Thank you very much in advance. I've been wanting this for years (having come from Dopus).
Edit:
Never mind, I found it. I can simply use the normal 'Size' column. I just had to turn off the 'Show item count with folder sizes' off.
But, is the script really the fastest way XyPlorer can count the amount of files in a folder? Or are you going to fix the 'File count' property?
Can you tell me which settings/scriptlines I need to do to get the two columns I described in my previous post?
Thank you very much in advance. I've been wanting this for years (having come from Dopus).
Edit:
Never mind, I found it. I can simply use the normal 'Size' column. I just had to turn off the 'Show item count with folder sizes' off.
But, is the script really the fastest way XyPlorer can count the amount of files in a folder? Or are you going to fix the 'File count' property?
Last edited by Sander Bouwhuis on 28 Apr 2014 18:19, edited 1 time in total.
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
-
admin
- Site Admin
- Posts: 65546
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Folder File Count Column?
Tip: You can paste this into a Custom Column definition (right-click the "Clear" button).
Code: Select all
Snip: CustomColumn 1
XYplorer 14.00.0001, 28.04.2014 18:17:18
Action
ConfigureColumn
Caption
Folder Size
Type
3
Definition
return foldersize(<cc_item>, <b>);
Format
1
Trigger
0
Item Type
1
Item Filter
FAQ | XY News RSS | XY X
-
FluxTorpedoe
- Posts: 904
- Joined: 05 Oct 2011 13:15
Re: Folder File Count Column?
Hi'
1. Ext+
- For folders, displays: FolderCount (NbSubFolders.NbFiles)
It's pretty stripped-down because I found it the easiest to interpret — fastest to read than e.g. Total:45(Dirs:3 / Files:42)
- For files, it depends on audio or images, etc. (WorkInProgress)
Edit: Much faster code for folders (less disk access)[/size]Old code was:[/size]
2. Size+
returns the total size of folders or files always in MB (same as above: after some trials, fastest to interpret on screen for me)[/size]
Hope this helps,
Flux
Edit: didn't see Don posted while I was writing... He's too fast!
)
I'm in a rush, so no time to detail right now, but as a matter of fact those were the first CCs I created! So here they are, they're still a work in progress but it should give you something to tinker with:iycgtptyarvg wrote:1. A column named Tot Files which counts the amount of files in the directory.
2. A column named Size which counts the amount of bytes in the directory or file.
1. Ext+
- For folders, displays: FolderCount (NbSubFolders.NbFiles)
It's pretty stripped-down because I found it the easiest to interpret — fastest to read than e.g. Total:45(Dirs:3 / Files:42)
- For files, it depends on audio or images, etc. (WorkInProgress)
Edit: Much faster code for folders (less disk access)
Code: Select all
if <cc_isfolder> {
$NbDirs = foldersize(<cc_item>, "<d>");
$NbFiles = foldersize(<cc_item>, "<f>");
return $NbDirs+$NbFiles." ($NbDirs.$NbFiles)";
} else {
if ("jpg;jpeg;png;gif;psd;tif;tiff;bmp;ico" Like "*<cc_ext>*") {
return property("#image.dimensions", <cc_item>);
} elseif ("mp3;wav;ogg" Like "*<cc_ext>*") {
return property("#audio.length", <cc_item>);
} elseif ("wma;avi;mkv;mp4;divx;mpg;mpeg" Like "*<cc_ext>*") {
return property("#27", <cc_item>);
} else {
return <cc_ext>;
}
}Code: Select all
if <cc_isfolder> {
return report("{count}", <cc_item>)." (".foldersize(<cc_item>, "<d>").".".foldersize(<cc_item>, "<f>").")";
}2. Size+
returns the total size of folders or files always in MB (same as above: after some trials, fastest to interpret on screen for me)
Code: Select all
if <cc_isfolder> {
return formatbytes(foldersize(<cc_item>, "<r>"), "MB", 1);
} else {
return formatbytes(report("{size}", <cc_item>), "MB", 1);
}Hope this helps,
Flux
Edit: didn't see Don posted while I was writing... He's too fast!
Last edited by FluxTorpedoe on 29 Apr 2014 08:18, edited 1 time in total.
• Scripts: Session Manager
| SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...
Re: Folder File Count Column?
That particular property is provided by Windows, so it's up to Microsoft to issue a fix. Seeing as enabling it in Explorer continues to give you a nice empty column in Windows 8, I think you might be better off using a script column.iycgtptyarvg wrote:Or are you going to fix the 'File count' property?
-
admin
- Site Admin
- Posts: 65546
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Folder File Count Column?
There is still the problem with sorting the formatted sizes. I will add a new CC format "bytes" that will take care of it. Let me just eat something...

FAQ | XY News RSS | XY X
-
admin
- Site Admin
- Posts: 65546
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Folder File Count Column?
In the next beta you can do this (Format 6 = Bytes!):
Code: Select all
Snip: CustomColumn 1
XYplorer 14.00.0001, 28.04.2014 19:45:48
Action
ConfigureColumn
Caption
Folder Size
Type
3
Definition
return foldersize(<cc_item>, <r>);
Format
6
Trigger
0
Item Type
1
Item Filter
- Attachments
-
- 2014-04-28_194909.png (14.06 KiB) Viewed 7414 times
FAQ | XY News RSS | XY X
-
Sander Bouwhuis
- Posts: 246
- Joined: 10 Jun 2008 15:40
- Location: Netherlands
Re: Folder File Count Column?
Don, regarding your suggestion:
return foldersize(<cc_item>, <b>);
This doesn't work because I get 'Access denied' script errors.
Anyway, I got it working now. I've been waiting for this for a long time
Thanks everyone for helping.
return foldersize(<cc_item>, <b>);
This doesn't work because I get 'Access denied' script errors.
Anyway, I got it working now. I've been waiting for this for a long time
Thanks everyone for helping.
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
XYplorer Beta Club