DirSizeCalc 2.22 (content plugin)

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
mtemp2
Member
Member
Posts: 107
Joined: 2009-01-15, 18:51 UTC

Re: DirSizeCalc 2.22 (content plugin)

Post by *mtemp2 »

Lefteous wrote:Current version 2.22
A new version is ready for download. 2.22 fixes a problem with getting values from symbolic links.
Hey, just tried to download it, the ZIP file, for updating from 1.21
But our firewall and/or antivirus system displays:
Gateway Anti-Virus Alert

This request is blocked by the Firewall Gateway Anti-Virus Service. Name: (Cloud Id: 11871719) MalUAgent.MIP (Trojan) blocked.
So, hmm, false alarm?


best, mtemp2
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2mtemp2
Yes, I guess it's false alarm. I cannot reproduce it here with Symantec turned on (have to).
milkaca
Junior Member
Junior Member
Posts: 53
Joined: 2015-02-23, 23:47 UTC
Location: Germany

Post by *milkaca »

2city_zen
To change the text used for the prefix you have to edit the language file and change the string in your language section.
This doesn't work in my case. I am using default eng language and have updated lng file.
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2amilino
This doesn't work in my case. I am using default eng language and have updated lng file.
The line to change is this one in the [eng] section. In this example I replaced B with P for the sake of whatever.

Code: Select all

; Prefixes.
B|KiB|MiB|GiB|kB|MB|GB=P|KiP|MiP|GiP|kP|MP|GP
milkaca
Junior Member
Junior Member
Posts: 53
Joined: 2015-02-23, 23:47 UTC
Location: Germany

Post by *milkaca »

Thank you, now it's working by following your example.
z9000
Junior Member
Junior Member
Posts: 4
Joined: 2018-02-27, 01:05 UTC

"Directory larger than" behavior "problem&quo

Post by *z9000 »

Hi,

It is not a bug per se, but if you set the size>1MB or something small it takes huge amount of time (apparently more than 10mins and does not look like almost ready at all) to check 5 directories all being larger than 1MB (they are in the 100GB range), 3 of them having no smaller files than 1mb and they are deeply recursed.
By my logic it should not take long to check a directory (in the above case at least: size larger than) : if having more added up than the set value it should break and return instead of continuing.

Here is 2 feature suggestions maybe worth implementing, please consider:

1, Check if a specific file or subdirectory exists inside the directory.
To clarify with examples: directory like ".git", file like "*.sln", etc. I know it's called DirSizeCalc but please...

2, Cache and recursion settings could be per rule and not global.

Thank you, also for making the plugin.
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2z9000
It is not a bug per se, but if you set the size>1MB or something small it takes huge amount of time (apparently more than 10mins and does not look like almost ready at all) to check 5 directories all being larger than 1MB (they are in the 100GB range), 3 of them having no smaller files than 1mb and they are deeply recursed.
By my logic it should not take long to check a directory (in the above case at least: size larger than) : if having more added up than the set value it should break and return instead of continuing.
I'm not sure if I understood this correctly. You can set a calculation limit to a certain number of files not a certain size.
1, Check if a specific file or subdirectory exists inside the directory.
To clarify with examples: directory like ".git", file like "*.sln", etc. I know it's called DirSizeCalc but please...
That's definitely a good idea.
Cache and recursion settings could be per rule and not global.
They are not global. They are field-specific. What do you mean by rule-specific?
z9000
Junior Member
Junior Member
Posts: 4
Joined: 2018-02-27, 01:05 UTC

Post by *z9000 »

Thanks for the answer.
Lefteous wrote:2z9000
It is not a bug per se, but if you set the size>1MB or something small it takes huge amount of time (apparently more than 10mins and does not look like almost ready at all) to check 5 directories all being larger than 1MB (they are in the 100GB range), 3 of them having no smaller files than 1mb and they are deeply recursed.
By my logic it should not take long to check a directory (in the above case at least: size larger than) : if having more added up than the set value it should break and return instead of continuing.
I'm not sure if I understood this correctly. You can set a calculation limit to a certain number of files not a certain size.
I'm sorry for not being clear, English is my second language and sometimes it shows. I'll be more specific:
So TC requests the directory from your plugin, then you get a list and you loop the results, if it is a file you increment a variable like totalsize with the size of the file and increment the filecount(for size calc not needed) variable by 1 or if its a directory then you increment the dircount(for size calc not needed) and recurse into that and so on... until you are done.
Now if the setting is "dirsizecalc size > [somevalue] [someunit]" and size setting is recursive. So every time you should compare: if targetsize<=totalsize then you should "return true" instead of going on. Works the other way around too: size < [somevalue] : return false. (see my original post now for details, imagine the scenario described there.)
Lefteous wrote:2z9000
1, Check if a specific file or subdirectory exists inside the directory.
To clarify with examples: directory like ".git", file like "*.sln", etc. I know it's called DirSizeCalc but please...
That's definitely a good idea.
Thank you.
Lefteous wrote:2z9000
Cache and recursion settings could be per rule and not global.
They are not global. They are field-specific. What do you mean by rule-specific?
I can set one setting for the field "size" so in this sense is global, I cannot set a rule to : size>10gb no recursion OR size<1mb recursion(do you see the advantage now?).

btw I'm also left handed.
User avatar
crconner
Junior Member
Junior Member
Posts: 23
Joined: 2004-12-25, 22:44 UTC
Location: USA

DirSizeCalcSettings.exe does not allow "Field" set

Post by *crconner »

I have read all 29 pages in TC's English forum thread for DirSizeCalc, and your Readme. Unless I missed it, I think I found a problem.

If I use DirSizeCalcSettings.exe to ADD a custom field, I cannot set (or preselect) any other field than SIZE (FieldIndex=0). After adding custom field, DirSizeCalcSettings.ini always shows the new custom field containing FieldIndex=0. I have to go into ini file and manually edit it to the proper value.

BTW, my TC is v9.12 x32; my DSC is v2.22 x32; my OS is Windows 7 SP1 x64
My hero, Mr. Ghisler. License #37856 since 1999.
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2crconner
Thanks for your report. I will investigate.
olevenets2
New Member
New Member
Posts: 1
Joined: 2018-04-23, 13:30 UTC

Post by *olevenets2 »

Hello, i can turn off the display of tokens in the plugin and how to do it?
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

No, you cannot turn them off currently. What is the reason why you don't want them to be displayed? If everything is fine, they are not displayed. If they are not displayed although the calculation is not complete, you could perform unwanted decision on such a folder.
User avatar
mhe
Junior Member
Junior Member
Posts: 70
Joined: 2003-02-16, 15:09 UTC

Post by *mhe »

Is there a way to make use of "everything" for calculating space? I like how fast shift+alt+enter is to calculate space using voidtools "everything", but it's a problem to send that command every time i change directory.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2mhe
but it's a problem to send that command every time i change directory.
You can make a View Mode that has the command *cm_CountDirContent in the "Auto run commands" field, and then add an Auto Switch Mode for that View Mode, then the sizes of directories will be updated automatically.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
mhe
Junior Member
Junior Member
Posts: 70
Joined: 2003-02-16, 15:09 UTC

Post by *mhe »

petermad wrote:2mhe
but it's a problem to send that command every time i change directory.
You can make a View Mode that has the command *cm_CountDirContent in the "Auto run commands" field, and then add an Auto Switch Mode for that View Mode, then the sizes of directories will be updated automatically.
That's fantastic, thanks a bunch!
Post Reply