TCBL new version (1.04 )

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
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: intermediate version (983)

Post by *nsp »

tcvol wrote: great thanks
it's almost done ;-)
1st column PLUGIN
2nd, 3rd, 4th TCBL

a few glitches here and there ;-)

here is my report:

Code: Select all

PLUGIN	sizeB	 sizeKB	sizeMB
782.761.964	7.827.600.000.000	7.644.200.000	746.5
The $#Sb $#SK $#SM $#SG are rounded to have minimum 5 relevant digits and have a maximum size of 10 characters when using Scientific notation. The Calculation is using the following definition 1b = 1b, 1024b = 1Ko, 1024Ko = 1Mo, 1024Mo = 1Go.

$#S is the full Size (normally similar to the plugin !)

So for you first file, the output of tcbl $#S $#Sb $#SK $#SM should be :
782761964 7.8276E+08 7.6442E+05 746.50
(No extra dot, comma or whatever, I've done some test and it is the format i get.)

I think you have some trouble with excel number separator, tcbl is not aware of local separator...

Hope it can help.....

Thanks a lot for your reports and for using TCBL ;)
If you (and everyone) have some propositions i will study it for next release.
The Unicode support is not in the scope as we use it mainly from command line and with ansi names/files.
tcvol
Junior Member
Junior Member
Posts: 67
Joined: 2009-02-02, 12:35 UTC

Re: intermediate version (983)

Post by *tcvol »

nsp wrote:
tcvol wrote:

Code: Select all

PLUGIN	sizeB	 sizeKB	sizeMB
782.761.964	7.827.600.000.000	7.644.200.000	746.5
The $#Sb $#SK $#SM $#SG are rounded to have minimum 5 relevant digits and have a maximum size of 10 characters when using Scientific notation. The Calculation is using the following definition 1b = 1b, 1024b = 1Ko, 1024Ko = 1Mo, 1024Mo = 1Go.

$#S is the full Size (normally similar to the plugin !)

So for you first file, the output of tcbl $#S $#Sb $#SK $#SM should be :
782761964 7.8276E+08 7.6442E+05 746.50
(No extra dot, comma or whatever, I've done some test and it is the format i get.)

I think you have some trouble with excel number separator, tcbl is not aware of local separator...

Hope it can help.....

Thanks a lot for your reports and for using TCBL ;)
If you (and everyone) have some propositions i will study it for next release.
The Unicode support is not in the scope as we use it mainly from command line and with ansi names/files.
you are right, i imported the .csv file into excel to compare the values and converted the column to number with . after 3 digits.

regarding the first line it seems that there is one zero too much.

so I thought that $#Sb from TCBL should be equal to the plugin which I used as alternative.

so the line should ideally read be something like this:

Code: Select all

PLUGIN
782.761.964   782.761.964 764.415,98046875 746,4999809265137
since you rounded $#SG is it possible to add an ini= setting regarding digits after the , ??
e.g. ini=calc 8
which means 8 digits after the ,
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Version uploaded

Post by *nsp »

New version with file size calculation enhancement :
* Support Big Files > 1.5Go
* Added precision in ini section i.e ini=S 9 define precision of 9 digits the default is 6 (biggest precision that make sense is 15).
* Added calculation scheme ini=S S set SI calculation using base 10^3 instead of common usage using base 2^10 b for a Kib, ...
tcvol
Junior Member
Junior Member
Posts: 67
Joined: 2009-02-02, 12:35 UTC

Re: Version uploaded

Post by *tcvol »

nsp wrote:New version with file size calculation enhancement :
* Support Big Files > 1.5Go
* Added precision in ini section i.e ini=S 9 define precision of 9 digits the default is 6 (biggest precision that make sense is 15).
* Added calculation scheme ini=S S set SI calculation using base 10^3 instead of common usage using base 2^10 b for a Kib, ...

Code: Select all

[list]
ini=q
ini=S 15
ini=S 10^3
pre=echo off
pre=set mytemp=
pre=set myn=
pre=set list=$1
pre=set ssed=$2
pre=if exist "%list%" goto :list
pre=if not exist "%list%" goto :normal

pre=:normal
pre=set myn=0
pre=echo starting id at: %myn%
pre=goto :start

pre=:list
pre=for /f "usebackq" %%a in (`%ssed% -n "$p" "%list%"`) do set /a mytemp=%%a
pre=set myn=%mytemp%
pre=echo starting id at: %myn%
pre=goto :cont

pre=:start
pre=echo id	fullfilename	name	parent	gparent	ggparent	sizeB	sizeKB	sizeMB	sizeGB	datetime	ext	id_hd	> "$1"
pre=:cont
cmd=if exist $v:\.id set /p myid=<$v:\.id
cmd=echo output:$i
cmd=set /A myn=%myn%+1
cmd=set /A myi=%myn%+1
cmd=REM echo sizebyte: $#Sb
cmd=REM echo %myn%	$f	$n	$p1	$p2	$p3	$!%Size@DirSizeCalc.wdx%$!	=G%myi%/1024	=G%myi%/(1024*1024)	=G%myi%/(1024*1024*1024)	$#m	$e	%myid% >> "$1"
cmd=REM echo %myn%	$f	$n	$p1	$p2	$p3	$!%Size@DirSizeCalc.wdx%$!	=BEREICH.VERSCHIEBEN(H%myi%:H%myi%;0;-1)/1024	=BEREICH.VERSCHIEBEN(H%myi%:H%myi%;0;-1)/(1024*1024)	=BEREICH.VERSCHIEBEN(H%myi%:H%myi%;0;-1)/(1024*1024*1024)	$#m	$e	%myid% >> "$1"
cmd=echo %myn%	$f	$n	$p1	$p2	$p3	$!%Size@DirSizeCalc.wdx%$!	$#Sb	$#SK	$#SM	$#SG	$#m	$e	%myid% >> "$1"
end=PAUSE

hey the values are looking good !! cool!

Code: Select all

sizeBPLUGIN	sizeBTCBL	sizeKBTCBL	sizeMBTCBL	sizeGBTCBL
6252632351	6252632351	6106086.28	5.962.974.883	5.823.217.659
9883674017	9883674017	9.652.025.407	9.425.806.062	9.204.888.732
9602677403	9602677403	9.377.614.651	9.157.826.808	8.943.190.242
13228588812	1.32E+19	12918543.76	1.261.576.539	1.232.008.339
6137	6137	5.993.164.063	0.005852699	5.72E+02
13229552148	1.32E+19	12919484.52	126.166.841	1.232.098.057
6057	6057	5.915.039.063	0.005776405	5.64E+03
13228843878	1.32E+19	12918792.85	1.261.600.864	1.232.032.094
6056	6056	59.140.625	0.005775452	5.64E+03
8664246125	8664246125	8.461.177.856	8.262.869	8.069.208.008
8371	8371	8.174.804.688	0.007983208	7.80E+03
2019	2019	1.971.679.688	0.001925468	1.88E+03
10455996926	1.05E+19	10210934.5	9.971.615.721	9.737.905.977
12434929959	1.24E+19	12143486.29	1.185.887.333	1.158.093.098
2679	2679	2.616.210.938	0.002554893	2.50E+03
2025	2025	1.977.539.063	0.00193119	1.89E+03
9681102479	9681102479	9454201.64	9.232.618.789	9.016.229.286
2035	2035	1.987.304.688	0.001940727	1.90E+03
10392408812	1.04E+19	10148836.73	991.097.337	9.678.684.931
12284478998	1.23E+17	11996561.52	1.171.539.211	1.144.081.261
14229	14229	1.389.550.781	0.013569832	1.33E+04
14950346793	1.50E+19	14599948.04	1.425.776.176	1.392.359.547
one last thing if possible ;-)
it seems that you are on an english OS or at least english settings where a dot is used for a decimal.

maybe it is possible to add a setting in the ini section?
e.g.
ini=S .
ini=S ,

thx for TCBL & your latest enhancements :-]
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Version uploaded

Post by *nsp »

tcvol wrote:

Code: Select all

[list]
ini=q
ini=S 15
ini=S 10^3
one last thing if possible ;-)
it seems that you are on an english OS or at least english settings where a dot is used for a decimal.

maybe it is possible to add a setting in the ini section?
e.g.
ini=S .
ini=S ,

thx for TCBL & your latest enhancements :-]
I use TCBL in different OS language so i choose to use "." as "international decimal separator"...

Version 0.983++ with comma as decimal separator.

Code: Select all

# Set precision with 15 digits
ini=S 15
# use SI multiplier (10^3) instead of common (2^10) multiplier used for file size
ini=S S
# set "," as decimal separator for file size
ini=S , 
......
I hope this will help ;)
tcvol
Junior Member
Junior Member
Posts: 67
Joined: 2009-02-02, 12:35 UTC

Post by *tcvol »

superb - 0.983++ works like a charm ;-)

file.ini

Code: Select all

[list]
ini=q
ini=S 15
ini=S 10^3
ini=S ,
pre=echo off
pre=set mytemp=
pre=set myn=
pre=set list=$1
pre=set ssed=$2
pre=if exist "%list%" goto :list
pre=if not exist "%list%" goto :normal

pre=:normal
pre=set myn=0
pre=echo starting id at: %myn%
pre=goto :start

pre=:list
pre=for /f "usebackq" %%a in (`%ssed% -n "$p" "%list%"`) do set /a mytemp=%%a
pre=set myn=%mytemp%
pre=echo starting id at: %myn%
pre=goto :cont

pre=:start
pre=echo id	fullfilename	name	parent	gparent	ggparent	sizeB	sizeKB	sizeMB	sizeGB	datetime	ext	id_hd	> "$1"
pre=:cont
cmd=if exist $v:\.id set /p myid=<$v:\.id
cmd=echo output:$i
cmd=set /A myn=%myn%+1
cmd=set /A myi=%myn%+1
cmd=echo %myn%	$f	$n	$p1	$p2	$p3	$#Sb	$#SK	$#SM	$#SG	$#m	$e	%myid% >> "$1"
end=PAUSE

User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

Hi tcvol,
The following initialization reset precision to 10 and do not change calculation scheme.
tcvol wrote: file.ini

Code: Select all

[list]
...
ini=S 10^3
...
If the filesize of a file is 19605430784 B, we have :
(Common scheme 2^10)
19145928.5 KiB / 18697.1958007813 MiB / 18.2589802742004 GiB


(SI Scheme 10^3)
19605430.784 KB 19605.430784 MB 19.605430784 GB
tcvol
Junior Member
Junior Member
Posts: 67
Joined: 2009-02-02, 12:35 UTC

Post by *tcvol »

nsp wrote:Hi tcvol,
The following initialization reset precision to 10 and do not change calculation scheme.
tcvol wrote: file.ini

Code: Select all

[list]
...
ini=S 10^3
...
If the filesize of a file is 19605430784 B, we have :
(Common scheme 2^10)
19145928.5 KiB / 18697.1958007813 MiB / 18.2589802742004 GiB


(SI Scheme 10^3)
19605430.784 KB 19605.430784 MB 19.605430784 GB
ok, removed the line ;-)
bbbslayer
Junior Member
Junior Member
Posts: 14
Joined: 2009-11-11, 00:31 UTC

Post by *bbbslayer »

"-q" option does not work for me.

I make a button:

command:%Commander_Path%\TCBL\TCBL.exe

parameter:
-q %L "c:\Program Files (x86)\IrfanView\i_view32.exe" "$f" /convert=%T$z.png

but the output ignore my quote, it shows:

c:\Program Files (x86)\IrfanView\i_view32.exe somefile /convert=somefile

The execute file path has a space, so it fails. What's wrong with my script?
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

bbbslayer wrote:"-q" option does not work for me.

parameter:
-q %L "c:\Program Files (x86)\IrfanView\i_view32.exe" "$f" /convert=%T$z.png

but the output ignore my quote, it shows:

c:\Program Files (x86)\IrfanView\i_view32.exe somefile /convert=somefile

The execute file path has a space, so it fails. What's wrong with my script?
Sorry for very very late response....:oops:
The problem are :
1) -q means DO NOT AUTOQUOTE
2) parameters are received by TBCL without quote

In your case, use latest version without -q option or switch to tcbl script inside tcbl.ini.
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Post by *Hurdet »

i have in %L
c:\Programmi\System\
with
%L echo $f $n
i obtain
"c:\Programmi\System\S" "S"
Do it is possible to obtain
"c:\Programmi\System" ""
?

also:
with %L echo $p
i obtain
"c:\Programmi\System\"
Do it is possible to obtain
"c:\Programmi\System"
?
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

Hurdet wrote:i have in %L
c:\Programmi\System\
with
%L echo $f $n
i obtain
"c:\Programmi\System\S" "S"
Do it is possible to obtain
"c:\Programmi\System" ""
?

also:
with %L echo $p
i obtain
"c:\Programmi\System"
Do it is possible to obtain
"c:\Programmi\System"
?
Thanks for the report !
I've made a quick fix (latest \ is suppressed !), this is not what you asked but behave like if you entered "c:\Programmi\System"


$f will give you "c:\Programmi\System"
$n will give you "System"
$p will give you "c:\Programmi"

if you want to have different behavior for file and/or folder, i encourage you to use tcbl script with filter in file tcbl.ini :

Code: Select all

[FileFilter]
cmd=<D:>echo folder $f
cmd=<F:>echo file $f in folder $p
cmd=<E:>echo file/folder $f do not exists !
You can use as parameters : -i %L FileFilter
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Post by *Hurdet »

nsp wrote:I've made a quick fix (latest \ is suppressed !)
Ty :)
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Post by *Hurdet »

the link is dead.
User avatar
Trast
Junior Member
Junior Member
Posts: 64
Joined: 2011-12-18, 15:32 UTC

Post by *Trast »

Hurdet wrote:the link is dead.
It's works fine now :D
/Trast

Excuse my bad English and spelling. ;-)
Post Reply