DirSizeCalc 2.22 (content plugin)

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
petermad
Power Member
Power Member
Posts: 16099
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Apparantly I can still use manually inserted units as for example [CustomUnitConfig_xxx] but manually setting SizeDisplayType doesn't seem to work any more - sizes are shown af KiB, MiB and GiB.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2petermad
Where did you set it? It's not in the General section anymore starting from beta 7.
User avatar
petermad
Power Member
Power Member
Posts: 16099
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I set it manually with a text editor - and all my [CustomUnitConfig_xxx] settings worked but showing KiB,MiB,GiB in the file panels - so I tried also setting SizeDisplayType=0 in the [General] section, but without luck.

I also tried using SizeDisplayType=0 in the CustomUnitConfig sections because of what you wrote:
FIXED New unit-specific behavior of SizeDisplayType didn't work at all.
but again without any luck.


I guess I have to wait udtil UnitConfiguration is implemented in the GUi too.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2petermad
SizeDisplayType is not completely unit-specific because this would be confusing. You can choose one of the three possible values in the default unit config. If this value is set to binary or decimal you can also choose binary or decimal in each unit config. This approach ensures that kilo, mega and giga are always decimal or binary but never mixed.
I hope I could clarify this.
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

Lefteous wrote:List of changes in Version 2.00 BETA 8:
  • FIXED Non resursive field "File Count" showed up to 2 files too much.
This bug is still there in beta 8.

And let's say there is a folder containing 1 subfolder and 5 files.
"Dir Count" and "File Count" are supposed to give 1 and 5 respecively if Recursive=0, right? Now it gives 0 and 8.

And PassThroughValues=1 is set, it doesn't show values in archives.
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Raymond
Damn! I just noticed that the BETA 8 archive contains the old beta 7 archive. :oops:
I have uploaded an updated archive which whould contain beta 8.
And PassThroughValues=1 is set, it doesn't show values in archives.
The graphical configuration contains a hint what could be the reason.
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

Lefteous wrote:I have uploaded an updated archive which whould contain beta 8.
I just tried it again.
Again let's say there is a folder containing 1 subfolder and 5 files. Now "Dir Count" and "File Count" give me 0 and 5. Isn't it supposed to give me 1 and 5?
I set Recursive=0 of both "Dir Count" and "File Count" section.
The graphical configuration contains a hint what could be the reason.
I've noticed it says "You need to reinstall DirSizeCalc to apply this setting." I restarted TC, it still doesn't work. Did I miss anything?

BTW, what does "Cache values" for?
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Raymond
Again let's say there is a folder containing 1 subfolder and 5 files. Now "Dir Count" and "File Count" give me 0 and 5. Isn't it supposed to give me 1 and 5?
That works fine here with beta 8. Maybe you are using a cached field and have created the directory after the last value calculation. I have explained how caching works below.
I've noticed it says "You need to reinstall DirSizeCalc to apply this setting." I restarted TC, it still doesn't work. Did I miss anything?
Yes "reinstalling DirSizeCalc" is not the same as "restarting TC". TC only checks during first plug-in use if the plug-in has this certain capability.
Alternatively you could change the setting in Wincmd.ini manually and then restart TC.

Code: Select all

#_flags=14
# is the index number where DirSizeCalc is installed.
Hopefully the sorting behavior will be decoupled from the pass through behavior in future TC versions.
what does "Cache values" for?
Starting from DirSizeCalc 2.00 values of directory calculations can be cached. This setting allows you to control this behavior for each field. Currently you have to execute cm_refresh and reenter the directory of interest to get fresh values. The need for reentering the directory is a bug in TC and will be fixed in future TC versions.
http://www.ghisler.ch/board/viewtopic.php?t=17921
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

Lefteous wrote:That works fine here with beta 8. Maybe you are using a cached field and have created the directory after the last value calculation. I have explained how caching works below.
That's strange. I don't think it's because cache. I tried many folders. All the same: file count is correct, but subfolders don't count at all, always 0.
Here's ini content. (My disk is FAT32 by the way.)

Code: Select all

[FieldConfig_Directory Count]
FieldIndex=3
CalcMode=0
FollowJunctionPoints=0
FollowMointPoints=0
Recursive=0
UseCache=1
[FieldConfig_File Count]
FieldIndex=4
CalcMode=0
FollowJunctionPoints=0
FollowMointPoints=0
Recursive=0
UseCache=1
Yes "reinstalling DirSizeCalc" is not the same as "restarting TC". TC only checks during first plug-in use if the plug-in has this certain capability.
Alternatively you could change the setting in Wincmd.ini manually and then restart TC.

Code: Select all

#_flags=14
# is the index number where DirSizeCalc is installed.
Hopefully the sorting behavior will be decoupled from the pass through behavior in future TC versions.
Here is what I did.
First I change "4_flags=0" to "4_flags=14" in wincmd.ini and restart TC. No luck.
Then I removed the plugin, deleted all the plugin files except DirSizeCalc.ini, then reinstall this plugin. Still doesn't work. Did I miss something this tme? (I'm a little confused what exactly "reinstall plugin" means, why it's supposed to make difference.)
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Raymond
Here's ini content
You disabled recursive for the "directory count" field. That means it won't calculate any values for subdirectories. That doesn't make sense. It's planned to disable this setting in the user interface and to ignore it in the plug-in if he user has set it manually.
I'm a little confused what exactly "reinstall plugin" means, why it's supposed to make difference.
When the plug-in is removed it will also remove those flags.
This are all hints I can give you. It works fine here.
Maybe I'll change the default but it's always a bad tradeoff. As you may guess I'm not happy with the current situation how this is handled but it's the only way.
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

Lefteous wrote:You disabled recursive for the "directory count" field. That means it won't calculate any values for subdirectories. That doesn't make sense. It's planned to disable this setting in the user interface and to ignore it in the plug-in if he user has set it manually.
I'm not sure if I understand you very well, you mean it's by design?
Let's say there is a folder containing 1 subfolder called X and 5 files. And under X folder there's another subfolder called Y. If I set Recursive=1 for "dir count" and Recursive=0 for "file count", it will give me 2 and 5. That's not what I want. I only care about what's there under current calculated folder, not further more. That is, I want value 1 and 5. Can I do that?
When the plug-in is removed it will also remove those flags.
When I removed the plugin, wincmd.ini will like this

Code: Select all

[ContentPlugins]
0=%commander_path%\wdx\ImageInfo 1.42\Images.wdx
0_detect="(EXT="BMP")|(EXT="JPG")|(EXT="JPEG")|(EXT="GIF")|(EXT="TGA")|(EXT="PNG")|(EXT="PSD")|(EXT="TIFF")|(EXT="TIF")|(EXT="PCX")"
1=%commander_path%\wdx\Media 0.6.1\media.WDX
1_detect="EXT="AVI" | EXT="DIVX" | EXT="MPEG" | EXT="MPG" | EXT="ASF" | EXT="VOB" | EXT="MP1" | EXT="MP2" | EXT="MP3" | EXT="WAV" | EXT="AIFF" | EXT="OGG" | EXT="WMA" | EXT="MOV" | EXT="WMV" | EXT="AC3" | EXT="AU" | EXT="D2V" | EXT="RA""
2=%commander_path%\wdx\AudioInfo 1.4.3\AudioInfo.wdx
2_detect="EXT="MP3" | EXT="MP2" | EXT="MP1" | EXT="OGG" | EXT="WMA" | EXT="WAV" | EXT="VQF" | EXT="AAC" | EXT="APE" | EXT="MPC" | EXT="FLAC" | EXT="CDA" | EXT="IT" | EXT="XM" | EXT="S3M" | EXT="MTM" | EXT="MOD" | EXT="UMX""
3=%commander_path%\wdx\FileDesc 2.6.2\FileDesc.wdx
After install the plugin, several lines are added, like

Code: Select all

[ContentPlugins]
0=%commander_path%\wdx\ImageInfo 1.42\Images.wdx
0_detect="(EXT="BMP")|(EXT="JPG")|(EXT="JPEG")|(EXT="GIF")|(EXT="TGA")|(EXT="PNG")|(EXT="PSD")|(EXT="TIFF")|(EXT="TIF")|(EXT="PCX")"
1=%commander_path%\wdx\Media 0.6.1\media.WDX
1_detect="EXT="AVI" | EXT="DIVX" | EXT="MPEG" | EXT="MPG" | EXT="ASF" | EXT="VOB" | EXT="MP1" | EXT="MP2" | EXT="MP3" | EXT="WAV" | EXT="AIFF" | EXT="OGG" | EXT="WMA" | EXT="MOV" | EXT="WMV" | EXT="AC3" | EXT="AU" | EXT="D2V" | EXT="RA""
2=%commander_path%\wdx\AudioInfo 1.4.3\AudioInfo.wdx
2_detect="EXT="MP3" | EXT="MP2" | EXT="MP1" | EXT="OGG" | EXT="WMA" | EXT="WAV" | EXT="VQF" | EXT="AAC" | EXT="APE" | EXT="MPC" | EXT="FLAC" | EXT="CDA" | EXT="IT" | EXT="XM" | EXT="S3M" | EXT="MTM" | EXT="MOD" | EXT="UMX""
3=%commander_path%\wdx\FileDesc 2.6.2\FileDesc.wdx
4=%commander_path%\wdx\DirSizeCalc 2.00\DirSizeCalc.wdx
3_detect=
4_detect=
4_date=943622338
4_flags=14
I noticed there's this "3_detect=", what it has anthing to do with the plugin (which # is 4) anyway. Wonder if it will give you any clue.
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Raymond
Can I do that?
Currently not but maybe I can add it. I cannot promise it though.
Wonder if it will give you any clue.
That looks just fine. The size field should really show values in archives in this configuration.
Last edited by Lefteous on 2008-01-30, 18:25 UTC, edited 1 time in total.
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

Lefteous wrote: Currently not but maybe I can add it. I cannot promise it though.
I will wait. In fact it's the feature I've been wishing for a long time.

And thank you for your work.:)
User avatar
petermad
Power Member
Power Member
Posts: 16099
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Damn! I just noticed that the BETA 8 archive contains the old beta 7 archive. Embarassed
I have uploaded an updated archive which whould contain beta 8.
That helped a lot - now I can almost make it work :-)

Except when I use SizeDisplayType=1 then the non custom fields [=dirsizecalc.Size.kB] [=dirsizecalc.Size.MB] and [=dirsizecalc.Size.GB] are all shown as [=dirsizecalc.Size.B] - wheras custom defined units are show as expected.

Using SizeDisplayType=0 or SizeDisplayType=2 also works OK.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 16099
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2Lefteous
DirSizeCalc doesn't show the same sizes inside and outside of zip archives when I use custom units.

See http://madsenworld.dk/tcmd/dirsizecalc1.png where the right panel shows the content of a zip file, and the left panel shows the same files unzipped.

Here are my custom unit definitions:

[Default_CustomUnitConfig]
SizeDisplayType=0

[CustomUnitConfig_All_Dims]
AllowedUnits=15
NumberOfDigits=2
WantByteDigits=1

[CustomUnitConfig_BMB2]
AllowedUnits=5
NumberOfDigits=2

[CustomUnitConfig_MB2]
AllowedUnits=5
NumberOfDigits=2
MinFileSizeM=1
Last edited by petermad on 2008-02-03, 08:44 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply