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: 1813
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

\/4D3R wrote:do you want me to translate the TCBL.txt to german?
Yes ! but it could be better to wait for the next version (mid October) as i will probably add some options...
Thx for the proposition !
\/4D3R
Junior Member
Junior Member
Posts: 20
Joined: 2005-05-19, 20:13 UTC

Post by *\/4D3R »

sure just let me know.

ok here is my final result, which you can add as an example to the tcbl.txt if you want.

tc menu call with buttonbar:

Code: Select all

[Buttonbar]
Buttoncount=1
button1=%commander_path%\icons\menubar\tcbl\mkv.ico
cmd1=""%commander_path%\addons\tcmd\tcbld\tcbl_new.exe" -I "%commander_path%\.scripts\tcbl\file.ini""
param1=%L "list" "%T\genlist.xls"
menu1=&filelist
file.ini

Code: Select all

[list]
pre=echo off
pre=echo id	fullfilename	name	parent	gparent	ggparent	sizeB	sizeKB	sizeMB	sizeGB	datetime	ext > "$1"
cmd=echo $i
cmd=set /A myi=$i+1
cmd=echo $i	$f	$n	$p1	$p2	$p3	$!%Size@DirSizeCalc.wdx%$!	=G%myi%/1024	=G%myi%/(1024*1024)	=G%myi%/(1024*1024*1024)	$#m	$e >> "$1"
end=PAUSE
User avatar
nsp
Power Member
Power Member
Posts: 1813
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

New version 0.965

Post by *nsp »

During tests (thx \/4D3R) , i've deteted some bug for large input file and filtering being disabled !

This is an intermediate version... it introduce some new feature but mainly correct some major bug !

// the new version is beta 0.965//
fix replacement of % sign in file
fix some filtering issue
fix bug with very large input file (>1000 files)

add ini section to set file counter start and step
add Odd and Pair files based on file counter

Q option do not quote and not replace %sign in filename
k option to keep generated file
e option use you default editor to edit the bat file.

add $p*n and $p+n commands to have path replacement more complete...

fell free to send me some snippet in order to complete documentation and wiki !
tcvol
Junior Member
Junior Member
Posts: 67
Joined: 2009-02-02, 12:35 UTC

Post by *tcvol »

will test the new version.

maybe i am too blind but i can't find the download link on your new site ;-)
User avatar
nsp
Power Member
Power Member
Posts: 1813
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

tcvol wrote:will test the new version.

maybe i am too blind but i can't find the download link on your new site ;-)
Thx it is corrected to see it on the first page...

Not blind (it was installation....)
tcvol
Junior Member
Junior Member
Posts: 67
Joined: 2009-02-02, 12:35 UTC

Post by *tcvol »

1)
small request:

can you add a variable to define the output of $#m, $#c and $#a.

default is: YYYYmmDD-HHMMSS

e.g.
Date:
$#mY = YYYY
$#mYm = YYYYmm
$#mYmD = YYYYmmDD

or

$#mY = YYYY
$#mm = mm
$#mD = DD

Time:
$#mH = HH
$#mM = MM
$#mS = SS

just saw the new ini= section. maybe it's a good place to define it there.

2)
maybe you could add some info text that tc's own .wdx cannot be used.


3)
tried the new ini= section.

Code: Select all

[test1]
ini=5 5
pre=@echo off
pre=REM
cmd=echo $c
end=PAUSE
output:

Code: Select all

5 5 2 5 50005
0010
0015
0020
0025
did you delete the info about counters on purpose?
can you add a line that only one ini= is allowed.
User avatar
nsp
Power Member
Power Member
Posts: 1813
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

tcvol wrote:1)
small request:

can you add a variable to define the output of $#m, $#c and $#a.
...
just saw the new ini= section. maybe it's a good place to define it there.

2)
maybe you could add some info text that tc's own .wdx cannot be used.


3)
tried the new ini= section.

did you delete the info about counters on purpose?
can you add a line that only one ini= is allowed.
Hi tcvol,

you can find in the server a new cersion with an undocumented ini section for output formating of $#acm :twisted: :

Code: Select all

ini=# %Y%m%d week %V time : %H:%M:%S 
the used format is the standard C strftime format.

You will also find a new command #S[bKMG] for the size of the file in byte, Kilo, Mega, Giga (using 1024 as divider).


for documentation i will complete it when i will have more time...

the unwanted 5 5 2 5 5 output of your exampe was a debug message not removed :oops:


THx for your feedback !
tcvol
Junior Member
Junior Member
Posts: 67
Joined: 2009-02-02, 12:35 UTC

Post by *tcvol »

it seems like it's still the old version on the server.

tcbl_dist.zip
tcbl_update.zip

the tcbl.exe in both .zip files is dated 14.09.2009 12:57
User avatar
nsp
Power Member
Power Member
Posts: 1813
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

Thx !
should be ok now..
min2max
Junior Member
Junior Member
Posts: 13
Joined: 2009-12-25, 05:53 UTC

Post by *min2max »

Hello, I'm quite new to TC, and found TCBL quite interesting. It's stated in the doc of the package that

"Personally I use inside TC to launch a lot of imagemagick command resize,rotate,contrast...integrated inside a nice toolbar ;)
I also use it to concatenate all the file together, rename/copy folder and files,...
unzip all selected file into a target folder"

Could the author of TCBL please elaborate on these powerful extension usages of TC? I believe new users (and even experienced users) of TC and TCBL will benefit much more from some more detailed introduction on these concrete applications.

Thanks for the the great tools!

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

Post by *nsp »

min2max wrote:Hello, I'm quite new to TC, and found TCBL quite interesting. It's stated in the doc of the package that
... imagemagick command resize,rotate,...integrated inside a nice toolbar ;)

I also use it to concatenate all the file together, rename/copy folder and files,...
Could the author of TCBL please elaborate ....
Max
You can get a look to the TCBL website on the sample section, http://tccfestuff.free.fr


Merry X Mass to all !
min2max
Junior Member
Junior Member
Posts: 13
Joined: 2009-12-25, 05:53 UTC

Post by *min2max »

nsp wrote:You can get a look to the TCBL website on the sample section, ...


Merry X Mass to all !
Thank you for the pointer!

I've skimmed through all of the doc. But I'm still somewhat confused.

As there's a tcbl.ini.sample file coming with the package. I think an example showing utilizing the contents of it with -i option will be helpful.

Frankly speaking, the wiki page is not very convenient, as least for me as a green hand, to browse around to locate the desired page. My recommendation is to provide a tree-structured index at the left pane of the page.

Thank you very much for the great work anyway! I believe I would finally figured it out with you help.
min2max
Junior Member
Junior Member
Posts: 13
Joined: 2009-12-25, 05:53 UTC

Post by *min2max »

Or one concrete question,

how is the 'script_name' of an ini file collaborating with the command line of TCBL?

e.g. I have a segment in my ini file:

[imagik.Half]
;add ImageMagik in the path
pre=set PATH=C:\tools\graphic\ImageMagick\;%PATH%
pre=set img_resize="50%"
cmd=mogrify.exe -resize "%img_resize%" $f

how do I invoke this series of command?

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

Post by *nsp »

min2max wrote:Or one concrete question,

how is the 'script_name' of an ini file collaborating with the command line of TCBL?

e.g. I have a segment in my ini file:

Code: Select all

[imagik.Half]
;add ImageMagik in the path
pre=set PATH=C:\tools\graphic\ImageMagick\;%PATH%
pre=set img_resize="50%"
cmd=mogrify.exe -resize "%img_resize%" $f
A) A command in an ini file is in fact a batch template, it is interpreted during bat generation.

B) if you use the file tcbl.ini in the same folder as tcbl.exe just use i option.

As a sample, to call from TC, you just have to use the following from a button.

Code: Select all

      cmd: %COMMANDER_PATH%\tools\tcbl\tcbl.exe 
      parameter: -i %L imagik.Half
      icon: what you want !
If it is not installed under total commander path in folder tools\tcbl, you should adapt it.
Some explanation :

Once you click on the button, you pass as option -i -> use inifile, the file of all selected files %L and the command to use inside the tcbl.ini imagik.Half.
===========================
In your case if you selected :

Code: Select all

c:\My Images\img001.jpg
c:\My Images\img002.jpg
c:\My Images\img003.jpg
the produced bat should be :

Code: Select all

set PATH=C:\tools\graphic\ImageMagick\;%PATH%
set img_resize="50%"
mogrify.exe -resize "%img_resize%" "c:\My Images\img001.jpg"
mogrify.exe -resize "%img_resize%" "c:\My Images\img002.jpg"
mogrify.exe -resize "%img_resize%" "c:\My Images\img003.jpg"
If you want to see it before execution, use -ei options instead of -i. You will get notepad launched with the file produced, you can modify it befor execution. In the console, you press a key and the execution continue !

...
The tools was intended for people that used lst2multi and wanted to have an external tool (like me ;) to also use it outside of TC...
tcvol
Junior Member
Junior Member
Posts: 67
Joined: 2009-02-02, 12:35 UTC

Post by *tcvol »

here are a few examples ..

Code: Select all


[cpar2filesblock]
pre=@echo off
pre=REM
pre=title copy all files, 1 par block for all files
pre=REM
pre=REM $1 = %%commander_path%%\.scripts\par2\par2.exe
pre=REM $2 = parsize
pre=REM $3 = %T (target dir)
pre=REM $4 = finish task
pre=REM
pre=if exist "%~dp0finish.cmd" del "%~dp0finish.cmd"
pre=copy "$4" "%~dp0finish.cmd"
cmd=copy "$f" "$3\$n"
end=echo invoking par2/.
end=$1 c -r$2 -t+ -l "$3\generated.par2" "$3\*.*" && echo . > "$3\.transferred" && echo . > "$3\.packaged"
end="%~dp0finish.cmd"
end=pause

[cpar2files]
pre=@echo off
pre=REM
pre=title copy all files, 1 par block per file
pre=REM
pre=REM %1 = %%commander_path%%\.scripts\par2\par2.exe "%T"
pre=REM %2 = parsize
pre=REM %3 = %T (target dir)
pre=REM %4 = finish task
pre=REM
pre=if exist "%~dp0finish.cmd" del "%~dp0finish.cmd"
pre=copy "$4" "%~dp0finish.cmd"
cmd=echo invoking copy/par2
cmd=copy "$f" "$3\$n" && $1 c -r$2 -t+ -l "$3\$n.par2" "$f"
end=echo invoking .
end=echo . > "$3\.transferred"
end=echo . > "$3\.packaged"
end="%~dp0finish.cmd"
end=REM pause

[rpar2filesblock]
pre=@echo off
pre=REM
pre=title 1 archive for all files, 1 par block per archive
pre=REM
pre=REM $1 = %%commander_path%%\.scripts\par2\par2.exe
pre=REM $2 = %%commander_path%%\addons\util\winrar\winrar.exe
pre=REM $3 = 7 (par size)
pre=REM $4 = 100 (rar size)
pre=REM $5 = %P (source dir)
pre=REM $6 = %T (target dir)
pre=REM $7 = finish task
pre=REM
pre=if exist "%~dp0finish.cmd" del "%~dp0finish.cmd"
pre=copy "$7" "%~dp0finish.cmd"
end=REM echo switching dir
end=REM pushd "$5"
end=echo invoking rar/par/.
end=$2 a -v$4m "$6\generated_archive.rar" @$L && $1 c -r$3 "$6\generated_archive.par2" "$6\generated_archive.*rar" && echo . > "$6\.packaged" && echo . > "$6\.transferred"
end="%~dp0finish.cmd"
end=REM pause

[rpar2files]
pre=@echo off
pre=REM
pre=title 1 archive per selected file, 1 par block per archive
pre=REM
pre=REM %1 = %%commander_path%%\.scripts\par2\par2.exe 
pre=REM %2 = %%commander_path%%\addons\util\winrar\winrar.exe
pre=REM %3 = 7 (par size)
pre=REM %4 = 100 (rar size)
pre=REM %5 = %P (source dir, not used)
pre=REM %6 = %T (target dir)
pre=REM %7 = finish task
pre=REM
pre=if exist "%~dp0finish.cmd" del "%~dp0finish.cmd"
pre=copy "$7" "%~dp0finish.cmd"
cmd=REM echo switching dir
cmd=REM pushd "$p"
cmd=echo invoking rar/par: $f
cmd=$2 a -v$4m "$6\$n.rar" "$n" && $1 c -r$3 "$6\$n.par2" "$6\$n.*rar"
end=echo invoking .
end=echo. > "$6\.packaged" && echo . > "$6\.transferred"
end="%~dp0finish.cmd"
end=REM pause

[cpar2folders]
pre=@echo off
pre=REM
pre=title copy all folders, 1 par block per folder
pre=REM
pre=REM $1 = %%commander_path%%\.scripts\par2\par2.exe
pre=REM $2 = parsize
pre=REM $3 = %T (target dir)
pre=REM $4 = finish task
pre=REM
pre=set target=$3
pre=if exist "%~dp0finish.cmd" del "%~dp0finish.cmd"
pre=copy "$4" "%~dp0finish.cmd"
cmd=echo invoking xcopy/par2/.
cmd=xcopy "$f\*.*" "%target%$n\" /S /I && echo . > "%target%$n\.transferred" && $1 c -r$2 -l "%target%\$n\$n.par2" "$f\*.*" && echo . > "%target%$n\.packaged"
cmd=REM 
end="%~dp0finish.cmd"
end=REM pause

[rpar2foldersblock]
pre=@echo off
pre=REM 
pre=title 1 archive for all folders, 1 par block
pre=REM 
pre=REM $1 = %%commander_path%%\.scripts\par2\par2.exe
pre=REM $2 = %%commander_path%%\addons\util\winrar\winrar.exe
pre=REM $3 = par size
pre=REM $4 = rar size
pre=REM $5 = %P (source dir)
pre=REM $6 = %T (target dir)
pre=REM $7 = finish task
pre=REM
pre=if exist "%~dp0finish.cmd" del "%~dp0finish.cmd"
pre=copy "$7" "%~dp0finish.cmd"
pre=REM echo switching dir
pre=REM cd\
pre=REM echo switching dir
pre=REM pushd "$5"
pre=set target=$6
end=echo invoking rar/par/.
end="$2" a -ilog"%target%.rarlog" -v$4m "%target%generated_archive.rar" @$L && $1 c -r$3 "%target%\generated_archive.par2" "%target%\generated_archive.*rar" && echo . > "%target%\.packaged" && echo . > "$6\.transferred"
end="%~dp0finish.cmd"
end=pause

[rpar2folders]
pre=@echo off
pre=REM
pre=title 1 archive per folder, 1 par block per package
pre=REM
pre=REM $1 = %%commander_path%%\.scripts\par2\par2.exe
pre=REM $2 = %%commander_path%%\addons\util\winrar\winrar.exe
pre=REM $3 = par size
pre=REM $4 = rar size
pre=REM $5 = %P (source dir)
pre=REM $6 = %T (target dir)
pre=REM $7 = finish task
pre=REM
pre=set target=$6
pre=if exist "%~dp0finish.cmd" del "%~dp0finish.cmd"
pre=copy "$7" "%~dp0finish.cmd"
cmd=echo creating directory
cmd=mkdir "%target%$n"
cmd=echo invoking rar/par2/.
cmd="$2" a -ilog"%target%.rarlog" -v$3m "%target%$n\$n.rar" "$n" && $1 c -r$4 "%target%$n\$n.par2" "%target%$n\$n.*rar" && echo . > "%target%$n\.packaged" && echo . > "%target%$n\.transferred"
end="%~dp0finish.cmd"
end=pause

Post Reply