nsp wrote:it does work, when using no spaces, but does not if you use spaces.tcvol wrote:
[face=courier]The Solution seems to be:[/face]Code: Select all
parameters= %P%N testhd "%P" "%T" ....
see #2, var2, var3
from my point of view it seems that tcbl has a problem if 2 parameters use quotes.
path/filenames with and without quotes should be treated equally.
it seems that if i use 4 quotes, only 3 are recognized by tcbl (last post).
1)
input: c:\temp\te st\!sync.log
?%P%N testhd %P "%P" "%P"
2)Code: Select all
C:\temp\te st>echo var1: C:\temp\te var1: C:\temp\te C:\temp\te st>echo var1 quotes from tcbl script: "C:\temp\te" var1 quotes from tcbl script: "C:\temp\te" C:\temp\te st>echo var2: st\ var2: st\ C:\temp\te st>echo var2 quotes from tcbl script: "st" var2 quotes from tcbl script: "st" C:\temp\te st>echo var3: C:\temp\te st\ var3: C:\temp\te st\ C:\temp\te st>echo var3 quotes from tcbl script: "C:\temp\te st" var3 quotes from tcbl script: "C:\temp\te st" C:\temp\te st>PAUSE Drücken Sie eine beliebige Taste . . .
input: c:\temp\!test
?%P%N testhd %P "%P" "%P"
Code: Select all
C:\temp>echo var1: C:\temp\ var1: C:\temp\ C:\temp>echo var1 quotes from tcbl script: "C:\temp" var1 quotes from tcbl script: "C:\temp" C:\temp>echo var2: C:\temp\ var2: C:\temp\ C:\temp>echo var2 quotes from tcbl script: "C:\temp" var2 quotes from tcbl script: "C:\temp" C:\temp>echo var3: C:\temp\ var3: C:\temp\ C:\temp>echo var3 quotes from tcbl script: "C:\temp" var3 quotes from tcbl script: "C:\temp" C:\temp>PAUSE Drücken Sie eine beliebige Taste . . .
TCBL new version (1.04 )
Moderators: Hacker, petermad, Stefan2, white
Tcvol, you cannot use %P or %T without quotes as shown "%P" "%T". Total commander does not automatically quote them when it pass parameter to external programtcvol wrote:
[face=courier]The Solution seems to be:[/face]it does work, when using no spaces, but does not if you use spaces.Code: Select all
parameters= %P%N testhd "%P" "%T" ....
see #2, var2, var3...?
...
%P%N testhd %P "%P" "%P"
...


Consider this as a TC incomplete feature (only quoting filenames) or/and a windows bug... But thrust me, this is not due to TCBL !
because of the mentioned "problem" i think i got the parameters for the menubar/submenu right
it works now if %P or %N or %T has a whitespace within the name:
in the batch file use double quotes when using it with a command line app
see also this thread:
http://ghisler.ch/board/viewtopic.php?p=167867#167867
it works now if %P or %N or %T has a whitespace within the name:
Code: Select all
menu2=&deploy
button2="%commander_path%\icons\tcmenu\copyhd.ico"
cmd2=""%commander_path%\addons\tcmd\tcbl\tcbl.exe" -I "%commander_path%\.scripts\tcbl\deploy.ini""
param2=%P%N "deploytc" "%%commander_path%%\addons\util\winrar\winrar.exe" "%%commander_path%%\addons\util\cli\shortcut.exe" "%P\" "%T\"
see also this thread:
http://ghisler.ch/board/viewtopic.php?p=167867#167867
new questions 
how can i use a wdx from tc?
the following works .. but what should i use for tc's own columns?
tcbl.ini
tcbl.bar
what currently does not work is the following:
$!%fsize.size_unique_files.Gbytes@fsize.wdx% $!
thx

how can i use a wdx from tc?
the following works .. but what should i use for tc's own columns?
tcbl.ini
Code: Select all
[mkv]
pre=@echo on
pre=set tab=
pre=echo fileid%tab%filename%tab%fulldirname%tab%YYYYMMDD-HHMMSS%tab%parentdir%tab%sizeinbytes >> c:\temp\echo.txt
cmd=echo $c $n $p $#m $p1 $!%Size.GiB@DirSizeCalc.wdx%$! >> c:\temp\echo.txt
end=PAUSE
Code: Select all
menu3=&mkv
button3=c:\temp\short.ico
cmd3=""%commander_path%\addons\tcmd\tcbl\tcbl.exe" -I "%commander_path%\.scripts\tcbl\deploy.ini""
param3=%L mkv
$!%fsize.size_unique_files.Gbytes@fsize.wdx% $!
thx
You're welcometcvol wrote:new questions
how can i use a wdx from tc?
the following works .. but what should i use for tc's own columns?
what currently does not work is the following:
$!%fsize.size_unique_files.Gbytes@fsize.wdx% $!

SuperWdx (which i use as wdx proxy) does not support dimensions for numbers... for now, you can only use
Code: Select all
$!%fsize.size_unique_files@fsize.wdx% $!
You can test with SSetting which is included with SuperWdx.
Workaround if you want to get result as integer without no round !
use : [/code]set /A Size.Gb= $!%fsize.size_unique_files.Gbytes@fsize.wdx% $!/ (1024*1024*1024)[/code]
and you can use %Size.Gb% as dos variable...
If i can get some free time, i will look for adding some of those in SuperWdxPlus

yes and here we go:
update: small improvements
Code: Select all
[mkv]
pre=@echo on
pre=set tab=
pre=set mytarget=$1
pre=set mytarget=%mytarget%genlist.xls
pre=echo fileid%tab%fullname%tab%filename%tab%parentdir%tab%grandparentdir%tab%grandgrandparentdir%tab%sizebyte%tab%sizekbyte%tab%sizemb%tab%sizegb%tab%datechanged%tab%ext > %mytarget%
cmd=set myc=$C
cmd=set myfull=$f
cmd=set myname=$n
cmd=set myext=$e
cmd=set myp=$p1
cmd=set mygp=$p2
cmd=set myggp=$p3
cmd=set check1=%myp:~0,2%
cmd=for %%x in (A: B: C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do ( if "%%x" == "%check1%" set myp=%myp:~3%)
cmd=set check2=%mygp:~0,2%
cmd=for %%x in (A: B: C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do ( if "%%x" == "%check2%" set mygp=%mygp:~3%)
cmd=set check3=%myggp:~0,2%
cmd=for %%x in (A: B: C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do ( if "%%x" == "%check3%" set myggp=%myggp:~3%)
cmd=echo %myp%
cmd=echo %mygp%
cmd=echo %myggp%
cmd=if "%myp%"=="" set myp=C:
cmd=if "%mygp%"=="" set mygp=C:
cmd=if "%myggp%"=="" set myggp=C:
cmd=if "%myp%"=="%mygp%" set mygp=C:
cmd=if "%mygp%"=="%myggp%" set myggp=C:
cmd=if "%myp%"=="%myggp%" set myggp=C:
cmd=set /A mysize=$!%Size.GiB@DirSizeCalc.wdx%$!
cmd=set /A mysizek=$!%Size.GiB@DirSizeCalc.wdx%$! / 1024
cmd=set /A mysizemb=$!%Size.GiB@DirSizeCalc.wdx%$!/ (1024*1024)
cmd=set /A mysizegb=$!%Size.GiB@DirSizeCalc.wdx%$!/ (1024*1024*1024)
cmd=set mydate=$#m
cmd=echo %myc%%tab%%myfull%%tab%%myname%%tab%%myp%%tab%%mygp%%tab%%myggp%%tab%%mysize%%tab%%mysizek%%tab%%mysizemb%%tab%%mysizegb%%tab%%mydate%%tab%%myext% >> %mytarget%
ok i updated the script, which works for ~100-200 files.
however it just quits after a certain amount of files, when there are ~ 300-3000 files without any error.
is there any limit in tcbl, cmd.exe (buffer, etc. ..)?
thx
here is the used script:
command:
parameter:
update:
ok i tested it again with a simpler form and discovered 2 problems.
1) when using a .wdx tcbl adds 2 quotes at the end
e.g. 12345678"" instead of 12345678
a quick fix was to use set and "" in the echo statement
however
2) because of the quick fix, there seems to be a problem when the filename contains a % (percent sign)
it seems it is a genereal problem with % in the filename.
however it just quits after a certain amount of files, when there are ~ 300-3000 files without any error.
is there any limit in tcbl, cmd.exe (buffer, etc. ..)?
thx
here is the used script:
command:
Code: Select all
"%commander_path%\addons\tcmd\tcbl\tcbl.exe" -I "%commander_path%\.scripts\tcbl\mkv.ini"
Code: Select all
%L mkv2 "%T\"
Code: Select all
[mkv2]
pre=@echo off
pre=set tab=
pre=set mytarget=$1
pre=set mytarget=%mytarget%genlist.xls
pre=echo fileid%tab%fullname%tab%filename%tab%parentdir%tab%grandparentdir%tab%grandgrandparentdir%tab%sizebyte%tab%sizekbyte%tab%sizemb%tab%sizegb%tab%datechanged%tab%ext > %mytarget%
cmd=set myc=$C
cmd=set myfull=$f
cmd=set myname=$n
cmd=set myext=$e
cmd=set myp=$p1
cmd=set mygp=$p2
cmd=set myggp=$p3
cmd=set check1=%myp:~0,2%
cmd=for %%x in (A: B: C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do ( if "%%x" == "%check1%" set myp=%myp:~3%)
cmd=set check2=%mygp:~0,2%
cmd=for %%x in (A: B: C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do ( if "%%x" == "%check2%" set mygp=%mygp:~3%)
cmd=set check3=%myggp:~0,2%
cmd=for %%x in (A: B: C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do ( if "%%x" == "%check3%" set myggp=%myggp:~3%)
cmd=if "%myp%"=="" set myp=C:
cmd=if "%mygp%"=="" set mygp=C:
cmd=if "%myggp%"=="" set myggp=C:
cmd=if "%myp%"=="%mygp%" set mygp=C:
cmd=if "%mygp%"=="%myggp%" set myggp=C:
cmd=if "%myp%"=="%myggp%" set myggp=C:
cmd=set /A mysize=$!%Size@DirSizeCalc.wdx%$!
cmd=if %mysize% lss 0 set /A mysize=%mysize%*(-1)
cmd=set mysizek==G%myi%/(1024)
cmd=set mysizemb==G%myi%/(1024*1024)
cmd=set mysizegb==G%myi%/(1024*1024*1024)
cmd=set mydate=$#m
cmd=echo %myc%
cmd=echo "%myc%%tab%%myfull%%tab%%myname%%tab%%myp%%tab%%mygp%%tab%%myggp%%tab%%mysize%%tab%%mysizek%%tab%%mysizemb%%tab%%mysizegb%%tab%%mydate%%tab%%myext%" >> %mytarget%
end=PAUSE
ok i tested it again with a simpler form and discovered 2 problems.
1) when using a .wdx tcbl adds 2 quotes at the end
e.g. 12345678"" instead of 12345678
a quick fix was to use set and "" in the echo statement
however
2) because of the quick fix, there seems to be a problem when the filename contains a % (percent sign)
it seems it is a genereal problem with % in the filename.
Code: Select all
[mkv3]
pre=echo off
pre=set tab=
cmd=echo $i
cmd=REM bug: if $!%Size@DirSizeCalc.wdx%$! used in echo statement the result is 12345678"" instead of 12345678 - excel takes care of ""12345678"" -> 12345678
cmd=set mysize=$!%Size@DirSizeCalc.wdx%$!
cmd=echo $i%tab%$f%tab%$n%tab%$p1%tab%$p2%tab%$p3%tab%"%mysize%"%tab%=G$i%tab%=G$i%tab%=G$i%tab%$#m%tab%$e >> C:\temp\genereatedlist.xls
end=PAUSE
Yes tcbl have some limitations :\/4D3R wrote:ok i updated the script, which works for ~100-200 files.
however it just quits after a certain amount of files, when there are ~ 300-3000 files without any error.
is there any limit in tcbl, cmd.exe (buffer, etc. ..)?
thx
32K for a single ini section
8K for a single line of interpreted command.
if you want to avoid quoting problem, you should use the q parameter (Let me quote myself)
- - -
by the way i detected some bug for very long filelist (side effect) i will fix it later.
thx for your replynsp wrote:Yes tcbl have some limitations :\/4D3R wrote:ok i updated the script, which works for ~100-200 files.
however it just quits after a certain amount of files, when there are ~ 300-3000 files without any error.
is there any limit in tcbl, cmd.exe (buffer, etc. ..)?
thx
32K for a single ini section
8K for a single line of interpreted command.
if you want to avoid quoting problem, you should use the q parameter (Let me quote myself)
- - -
by the way i detected some bug for very long filelist (side effect) i will fix it later.
i am not sure if i get it right.
when do you use option -q?
when the textfile (e.g. %L, %P%N) is a long filename or the filename of each entry (e.g. $f)?
the option -Q doesn't change anything here.
still currently my problem is:
original filename: u:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\11 - gwen mccrae - 90% of me is you.mp3
tcbl converts $f to:
"U:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\11 - gwen mccrae - 90 of me is you.mp3"
now when putting together the line:
12 fields
Code: Select all
"2 u:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\11 - gwen mccrae - 90% of me is you.mp3 ...etc..."
2 fields
Code: Select all
"2 U:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\11 - gwen mccrae - 90tab1 - gwen mccrae - 90tabtabtabtab%mysize%tabtabtabtab0050725-225355 mp3"
the ini section is below 32K (saved it as a single file).
how can i check if a single line (cmd=) is below 8K?
thx again

The "q" (not "Q") parameter only tell that you will quote by yourself all the strings !\/4D3R wrote:thx for your reply
i am not sure if i get it right.
when do you use option -q?
when the textfile (e.g. %L, %P%N) is a long filename or the filename of each entry (e.g. $f)?
the option -Q doesn't change anything here.
still currently my problem is:
original filename: u:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\11 - gwen mccrae - 90% of me is you.mp3
tcbl never replace any % but the command interpreter does inside bat file..... !
(a new version is online for testing only that escape the % in filename and wdx result see post 1)
if you did not replace notepad you can use the "e" parameter to verify and even modify what will be interpreted !
Regards....
that -e option is cool 
i see what -q does now. i mixed up capital and small letters.
ok with the version from today (06.09.2009 16:42) i get the following tcbl.bat file:
and i guess % should be %% ..
if i replace it, the filename is correct.

i see what -q does now. i mixed up capital and small letters.
ok with the version from today (06.09.2009 16:42) i get the following tcbl.bat file:
Code: Select all
echo off
set tab=
echo 1
set mysize="4243080"
echo "1%tab%U:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\10 - martine girault - revival.mp3%tab%"
PAUSE
echo 2
set mysize="2712513"
echo "2%tab%U:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\11 - gwen mccrae - 90% of me is you.mp3%tab%"
PAUSE
echo 3
set mysize="4238064"
echo "3%tab%U:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\12 - burt bacharach - south american getaway (butch cassidy soundtrack version).mp3%tab%"
PAUSE
PAUSE
if i replace it, the filename is correct.
If you use the TCBL_New.exe see test vesrion the % will be automatically escaped as %%.\/4D3R wrote:that -e option is cool
i see what -q does now. i mixed up capital and small letters.
ok with the version from today (06.09.2009 16:42) i get the following tcbl.bat file:
and i guess % should be %% ..Code: Select all
echo off set tab= echo 1 set mysize="4243080" echo "1%tab%U:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\10 - martine girault - revival.mp3%tab%" PAUSE 8<......
if i replace it, the filename is correct.
By the way, you could have done this in one line only with the regular version !
Code: Select all
[mkv5]
cmd=$i $f $p3 $z $e $!%Size@DirSizeCalc.wdx%$! =F$i / 1048576
The file will be generated wihtout quote (q) and paused and edited (pe ) but not eXecuted (x) ....
From notepad, you can save it directly to your generatedList.xls ! (some empty line should be appear this can be easilly filtered with pspad, notepad++ ......
tab character is not altered by echo and tre %tab% trick is mostly used when you want to use it from command line. surrounding quote are useless also !
for those listing usage WdxInfoPacker made by franck8244 is more appropriate than tcbl....
[Edited] Small correction about empty lines and / operator

cool the % is replaced by %% now.
however, the .wdx seems to have a problem with a file and % in the filename.
instead of the value it prints out E.
maybe the .wdx function demands a "unescaped" filename? (e.g. one %)
e.g.
tcbl.bat
tested 1000, 9000 and 28000 (18MB tcbl.bat), 45000 files.
perfect, the script finishes now
i tried wdxinfo packer before but it is very limited.
tcbl (+ branch view, selected files) is much more flexible and powerful .. it's THE perfect tool
another question:
i just used $!%Size@DirSizeCalc.wdx%$! because i could not figure out how to use tc's own size call.
i tried $!%size@tc.wdx%$! and all other forms i could think of.
is there a way to use tc's attributes within tcbl?
however, the .wdx seems to have a problem with a file and % in the filename.
instead of the value it prints out E.
maybe the .wdx function demands a "unescaped" filename? (e.g. one %)
e.g.
tcbl.bat
Code: Select all
echo off
echo 1 "U:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\10 - martine girault - revival.mp3" "10 - martine girault - revival.mp3" "Bargrooves - Vintagegrooves\" "Bargrooves\Bargrooves - Vintagegrooves\" "Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\" "4243080" =G1 =G1 =G1 20050725-225346 mp3
echo 1 "U:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\10 - martine girault - revival.mp3" "10 - martine girault - revival.mp3" "Bargrooves - Vintagegrooves\" "Bargrooves\Bargrooves - Vintagegrooves\" "Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\" "4243080" =G1 =G1 =G1 20050725-225346 mp3 >> C:\temp\genlist.xls
echo 2 "U:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\11 - gwen mccrae - 90%% of me is you.mp3" "11 - gwen mccrae - 90%% of me is you.mp3" "Bargrooves - Vintagegrooves\" "Bargrooves\Bargrooves - Vintagegrooves\" "Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\" "E " =G2 =G2 =G2 mp3
echo 2 "U:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\11 - gwen mccrae - 90%% of me is you.mp3" "11 - gwen mccrae - 90%% of me is you.mp3" "Bargrooves - Vintagegrooves\" "Bargrooves\Bargrooves - Vintagegrooves\" "Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\" "E " =G2 =G2 =G2 mp3 >> C:\temp\genlist.xls
echo 3 "U:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\12 - burt bacharach - south american getaway (butch cassidy soundtrack version).mp3" "12 - burt bacharach - south american getaway (butch cassidy soundtrack version).mp3" "Bargrooves - Vintagegrooves\" "Bargrooves\Bargrooves - Vintagegrooves\" "Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\" "4238064" =G3 =G3 =G3 20050725-225408 mp3
echo 3 "U:\MP3EEZ\Compilation\Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\12 - burt bacharach - south american getaway (butch cassidy soundtrack version).mp3" "12 - burt bacharach - south american getaway (butch cassidy soundtrack version).mp3" "Bargrooves - Vintagegrooves\" "Bargrooves\Bargrooves - Vintagegrooves\" "Ambient Sunset Atmosphere Chill Out\Bargrooves\Bargrooves - Vintagegrooves\" "4238064" =G3 =G3 =G3 20050725-225408 mp3 >> C:\temp\genlist.xls
PAUSE
perfect, the script finishes now

i tried wdxinfo packer before but it is very limited.
tcbl (+ branch view, selected files) is much more flexible and powerful .. it's THE perfect tool

another question:
i just used $!%Size@DirSizeCalc.wdx%$! because i could not figure out how to use tc's own size call.
i tried $!%size@tc.wdx%$! and all other forms i could think of.
is there a way to use tc's attributes within tcbl?
.... small bug\/4D3R wrote:cool the % is replaced by %% now.
however, the .wdx seems to have a problem with a file and % in the filename.

New beta version should be ok ! (even with a "Q" option (that do not quote and do not replace % sign

unfortunately not, Unicode is missing, i have also bunch of enhancement in mind\/4D3R wrote:...... tcbl (+ branch view, selected files) is much more flexible and powerful t's THE perfect tool

\/4D3R wrote:another question:
i just used $!%Size@DirSizeCalc.wdx%$! because i could not figure out how to use tc's own size call.
i tried $!%size@tc.wdx%$! and all other forms i could think of.
is there a way to use tc's attributes within tcbl?
tc internal wdx attributes are not callable outside tc (as i know) but you can use filesys.wdx ...