I know, that this question is a little bit off-topic, but as I know that you're all in file managing I may ask it here:
Does anyone know a program (or a hidden TC command ) which displays folders within a directory tree which contain less than a given number of files?
Thanks in advance for any feedback!
~ Florian
Display folders with less than 3 files
Moderators: white, Hacker, petermad, Stefan2
- ghisler(Author)
- Site Admin
- Posts: 48083
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
No I don't, but since you are a programmer, you could write it yourself in half an hour, right?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
This is the sort of task for which the advanced commands (on the comand line or in batch files or aliases) in JPSoftware's Take Command 32 or 4NT are perfect. The following 1-line command will output the names of (and number of files in) any subfolder (at any level), which contains fewer than 20 files. (this could be edited to count only files meeting wildcard or attribute requirements):
Or for a more general solution you could define the alias:
and then invoke it like:
If you prefered you could list (or save to a file) all the filenames in these "small" folders, etc, etc...
You can download a full-featured 30-day trial version from:
http://jpsoftware.com
Code: Select all
global /i /q if %@files[*] LT 20 echo %_cwd %@files[*]
Code: Select all
alias fewfiles=global /i /q if %%@files[%%1] LT %%2 echo %%_cwd %%@files[%%1]
Code: Select all
fewfiles * 20
fewfiles *.doc 15
You can download a full-featured 30-day trial version from:
http://jpsoftware.com