TCBL new version (1.04 )
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Some user has suggested to put
CHCP 1252
in a batch file in front of the command, see:
http://ghisler.ch/board/viewtopic.php?t=18748
CHCP 1252
in a batch file in front of the command, see:
http://ghisler.ch/board/viewtopic.php?t=18748
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
ok if i just start the normal cmd and typeghisler(Author) wrote:Some user has suggested to put
CHCP 1252
in a batch file in front of the command, see:
chcp it says that 850 is active
if i use it in the test.ini file
cmd=chcp it says 1252 is active
i tried to set the codepage with both values, there is no difference.
i have 2 other small requests:
1)
is it possible to make use of %commander_path% in the alternate ini call?
currently i have to use the following for relative paths:
command: %commander_path%\addons\tcmd\TCBL\tcbl.exe
parameters: -I test.ini %L test
command path: %commander_path%\addons\tcmd\TCBL
i tried for parameters:
-I %commander_path%\addons\tcmd\tcbl\test.ini %L test
-I %%commander_path%%\addons\tcmd\tcbl\test.ini %L test
-I "%commander_path%\addons\tcmd\tcbl\test.ini" %L test
-I "%%commander_path%%\addons\tcmd\tcbl\test.ini" %L test
which didn't work.
2)
it seems that spaces are not "entirely" supported:
i mean it somehow works, but it is ugly

ini:
[testspaces]
pre=@echo on
cmd=mkdir "$1\$n
cmd=echo $n
end=pause
input:
c:\temp\test\Mühlen S01.TEST\
output dir ("%T"):
C:\temp\test\out put
command:
%commander_path%\addons\tcmd\TCBL\tcbl.exe
parameters:
-I test.ini %L testspaces "%T"
start path:
%commander_path%\addons\tcmd\TCBL
console output:
C:\xp\util\tcmd7\addons\tcmd\TCBL>mkdir "C:\temp\test\out "put"\Mühlen S01.TEST"
C:\xp\util\tcmd7\addons\tcmd\TCBL>echo "Mühlen S01.TEST"
"Mühlen S01.TEST"
C:\xp\util\tcmd7\addons\tcmd\TCBL>pause
Drücken Sie eine beliebige Taste . . .
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
Try:1)
is it possible to make use of %commander_path% in the alternate ini call?
command: %commander_path%\addons\tcmd\TCBL\tcbl.exe -I %commander_path%\addons\tcmd\tcbl\test.ini
parameters: %L test
command path: %commander_path%\addons\tcmd\TCBL
Note: environment variables are resolved as command only, while %L is resolved as parameter only ...
#5767 Personal license
thx sqa_wizardsqa_wizard wrote:Try:1)
is it possible to make use of %commander_path% in the alternate ini call?
command: %commander_path%\addons\tcmd\TCBL\tcbl.exe -I %commander_path%\addons\tcmd\tcbl\test.ini
parameters: %L test
command path: %commander_path%\addons\tcmd\TCBL
Note: environment variables are resolved as command only, while %L is resolved as parameter only ...
it works now the way you described.
and this works as well:
command: %commander_path%\tcbl\tcbl.exe -I %commander_path%\tcbl\test.ini
parameters: %L testumlaute %%commander_path%%\addons\util\winrar\winrar.exe
I tried also a bunch of stuff but I did not yet find a way to to solve this yet...tcvol wrote:if i use it in the test.ini file
cmd=chcp it says 1252 is active
i tried to set the codepage with both values, there is no difference.
You can use %commander_path% :tcvol wrote:i have 2 other small requests:
1)
is it possible to make use of %commander_path% in the alternate ini call?
.....
- in the command section of Total commander.
- as a parameter or for a command
- inside the ini file.
but not to define an alternate ini file.
It is fixed, you can try the new tcbl_update.zip file !tcvol wrote:2)
it seems that spaces are not "entirely" supported:
i mean it somehow works, but it is ugly.. what do you think?
Code: Select all
end=pause
nsp wrote:parameters:tcvol wrote:It is fixed, you can try the new tcbl_update.zip file !
%L testspaces "%T"
ini:
[testspaces]
pre=@echo on
cmd=mkdir "$1\$n"
cmd=echo . > "$1\$n\$n.nfo"
end=pause
console output:parameters:Code: Select all
C:\temp\test>mkdir "C:\temp\test\out put"\SchneeweißTEST" C:\temp\test>echo . 1>"C:\temp\test\out put"\SchneeweißTEST\SchneeweißTEST.nfo" C:\temp\test>mkdir "C:\temp\test\out put"\Neue Mühlen S01TEST.TEST" C:\temp\test>echo . Mühlen S01TEST.TEST\Neue Mühlen S01TEST.TEST.nfo" 1>"C:\tem p\test\out put"\Neue Zugriff verweigert C:\temp\test>mkdir "C:\temp\test\out put"\ÄrmelkanalTEST.TEST" C:\temp\test>echo . 1>"C:\temp\test\out put"\ÄrmelkanalTEST.TEST\ÄrmelkanalTEST .TEST.nfo" C:\temp\test>pause Drücken Sie eine beliebige Taste . . .
%L testspaces "%T"
ini:
[testspaces]
pre=@echo on
cmd=mkdir $1\$n
cmd=echo . > $1\$n\$n.nfo
end=pause
--> does work for $1 (output) with spaces .. does not work if $n has spacesCode: Select all
C:\temp\test>mkdir "C:\temp\test\out put"\SchneeweißTEST" C:\temp\test>echo . 1>"C:\temp\test\out put"\SchneeweißTEST\SchneeweißTEST.nfo" C:\temp\test>mkdir "C:\temp\test\out put"\Neue Mühlen S01TEST.TEST" C:\temp\test>echo . Mühlen S01TEST.TEST\Neue Mühlen S01TEST.TEST.nfo" 1>"C:\tem p\test\out put"\Neue Zugriff verweigert C:\temp\test>mkdir "C:\temp\test\out put"\ÄrmelkanalTEST.TEST" C:\temp\test>echo . 1>"C:\temp\test\out put"\ÄrmelkanalTEST.TEST\ÄrmelkanalTEST .TEST.nfo" C:\temp\test>pause Drücken Sie eine beliebige Taste . . .
those dirs are created:
c:\temp\test\Mühlen\
c:\temp\test\S01TEST.TEST\
c:\temp\test\out put\ÄrmelkanalTEST.TEST\
c:\temp\test\out put\Neue\
c:\temp\test\out put\SchneeweißTEST\
if you define "%T" in TC, TCBL intercept %T" and not %T i did a try wit a very simple C porgramm that show params.tcvol wrote:Code: Select all
parameters: %L testspaces "%T"
From command line I did not get the extra quote.....
if your last param is "%T" , you can simply use "%T instead.. I will post a fix that strip last " from parameters.
==Edited==
Fix is online.
thx very much ..nsp wrote:if you define "%T" in TC, TCBL intercept %T" and not %T i did a try wit a very simple C porgramm that show params.tcvol wrote:Code: Select all
parameters: %L testspaces "%T"
From command line I did not get the extra quote.....
if your last param is "%T" , you can simply use "%T instead.. I will post a fix that strip last " from parameters.
==Edited==
Fix is online.
it works now with "%T":
C:\temp\te st>mkdir "C:\temp\te st\out put\ÄrmelkanalTEST.TEST"
C:\temp\te st>echo . 1>"C:\temp\te st\out put\ÄrmelkanalTEST.TEST\ÄrmelkanalTES
T.TEST.nfo"
C:\temp\te st>mkdir "C:\temp\te st\out put\Neue Mühlen S01TEST.TEST"
C:\temp\te st>echo . 1>"C:\temp\te st\out put\Neue Mühlen S01TEST.TEST\Neue Müh
len S01TEST.TEST.nfo"
C:\temp\te st>mkdir "C:\temp\te st\out put\S01TEST.TEST"
C:\temp\te st>echo . 1>"C:\temp\te st\out put\S01TEST.TEST\S01TEST.TEST.nfo"
C:\temp\te st>mkdir "C:\temp\te st\out put\SchneeweißTEST"
C:\temp\te st>echo . 1>"C:\temp\te st\out put\SchneeweißTEST\SchneeweißTEST.nfo
"
C:\temp\te st>pause
Drücken Sie eine beliebige Taste . . .
dirs:
c:\temp\te st\out put\ÄrmelkanalTEST.TEST\ÄrmelkanalTEST.TEST.nfo
c:\temp\te st\out put\Neue Mühlen S01TEST.TEST\Neue Mühlen S01TEST.TEST.nfo
c:\temp\te st\out put\S01TEST.TEST\S01TEST.TEST.nfo
c:\temp\te st\out put\SchneeweißTEST\SchneeweißTEST.nfo
Same version re-posted with code cleanup and smaller exe size.
here !..
==> Suggestion for next versions (around mid-April) ??
Those are the one i have but i will not implement all at once.
- Directory listing (instead of flat file) ?
- Alternative script processor ?
- ini script editor and graphical debugger ?
- embedded console ?
- unicode support ?
- stop dev it is useless !
here !..
==> Suggestion for next versions (around mid-April) ??
Those are the one i have but i will not implement all at once.
- Directory listing (instead of flat file) ?
- Alternative script processor ?
- ini script editor and graphical debugger ?
- embedded console ?
- unicode support ?
- stop dev it is useless !
This is not a bug !tcvol wrote:small bug:
when i use the command
pushd "$p" works only with cmd= but not with pre= or end=
As pre and end are valid for all files, none of the file specific $directives are interpreted.
If you use TCBL from the search result list or with Branch view (^B in TC), selected files can have different path.
i think there is still a bug with quotes:
please try this script:
[testhd]
pre=echo var1: $1
pre=echo var1 quotes from tcbl script: "$1"
pre=echo var1: $2
pre=echo var1 quotes from tcbl script: "$2"
pre=echo var1: $3
pre=echo var1 quotes from tcbl script: "$3"
pre=PAUSE
with this menu button:
command: %commander_path%\addons\tcmd\tcbl\tcbl.exe -I "%commander_path%\addons\tcmd\tcbl\testhd.ini"
parameters: ?%P%N testhd %P "%P" ""%P""
check var2.
the output is not as it should be:
1) output from input c:\temp\!test:
2)
input from c:\TEMP\te st\!sync.log
please try this script:
[testhd]
pre=echo var1: $1
pre=echo var1 quotes from tcbl script: "$1"
pre=echo var1: $2
pre=echo var1 quotes from tcbl script: "$2"
pre=echo var1: $3
pre=echo var1 quotes from tcbl script: "$3"
pre=PAUSE
with this menu button:
command: %commander_path%\addons\tcmd\tcbl\tcbl.exe -I "%commander_path%\addons\tcmd\tcbl\testhd.ini"
parameters: ?%P%N testhd %P "%P" ""%P""
check var2.
the output is not as it should be:
1) output from input c:\temp\!test:
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" "C:\temp"
var2: C:\temp" "C:\temp"
C:\temp>echo var2 quotes from tcbl script: "C:\temp" "C:\temp""
var2 quotes from tcbl script: "C:\temp" "C:\temp""
C:\temp>echo var3:
var3:
C:\temp>echo var3 quotes from tcbl script:
var3 quotes from tcbl script:
C:\temp>PAUSE
Drücken Sie eine beliebige Taste . . .
input from c:\TEMP\te st\!sync.log
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" "C:\TEMP\te
var3: C:\TEMP\te st" "C:\TEMP\te
C:\TEMP\te st>echo var3 quotes from tcbl script: "C:\TEMP\te st" "C:\TEMP\te"
var3 quotes from tcbl script: "C:\TEMP\te st" "C:\TEMP\te"
C:\TEMP\te st>PAUSE
Drücken Sie eine beliebige Taste . . .
Hi,tcvol wrote:i think there is still a bug with quotes:Code: Select all
[testhd] pre=echo var1: $1 .....
Code: Select all
parameters: ?%P%N testhd [b]%P[/b] "%P" ""%P""
i think there is a misunderstanding about quote, i only try to automatically quote $directives and this only inside tcbl and mainly for file directives.
Here, it seem that %P contains space and as it is passed by TC, you should quote all the single % parameter coming from TC.
About Bug :

[EDITED !!]
in fact, it seems that the parameters ar not well transmitted to the program.
// I've made a very simple C proggy that just output argc, argv
and this echoo.exe return same as tcbl.
I've found a way to have correct result with TC :
Code: Select all
parameters: ?%P%N testhd "%P"" "%P"" "%P""
that is not always correct.nsp wrote:
I've found a way to have correct result with TC :Code: Select all
parameters: ?%P%N testhd "%P"" "%P"" "%P""
it works only if your path actually has spaces.
check # 1
parameters:?%P%N testhd %P "%P" "%P""
1)
e.g.:
%P = c:\Downloads\!list.nfo
Code: Select all
C:\Downloads>echo var1: C:\Downloads\
var1: C:\Downloads\
C:\Downloads>echo var1 quotes from tcbl script: "C:\Downloads"
var1 quotes from tcbl script: "C:\Downloads"
C:\Downloads>echo var2: C:\Downloads" C:\Downloads"
var2: C:\Downloads" C:\Downloads"
C:\Downloads>echo var2 quotes from tcbl script: "C:\Downloads" C:\Downloads""
var2 quotes from tcbl script: "C:\Downloads" C:\Downloads""
C:\Downloads>echo var3:
var3:
C:\Downloads>echo var3 quotes from tcbl script:
var3 quotes from tcbl script:
C:\Downloads>PAUSE
Drücken Sie eine beliebige Taste . . .
e.g.:
c:\temp\te st\!sync.log
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" C:\temp\te
var3: C:\temp\te st" C:\temp\te
C:\temp\te st>echo var3 quotes from tcbl script: "C:\temp\te st" C:\temp\te"
var3 quotes from tcbl script: "C:\temp\te st" C:\temp\te"
C:\temp\te st>PAUSE
Drücken Sie eine beliebige Taste . . .
I have the same trouble with other console applications... I will dig for next major versiontcvol wrote:
that is not always correct.
it works only if your path actually has spaces.
check # 1
[Edited].........................................
[face=comicsansms]Yippee ![/face]
I found that the trouble are due to the trailing "" that make windows parsing wrongly interpret last " !
[face=courier]The Solution seems to be:[/face]
Code: Select all
parameters= %P%N testhd "%P" "%T" ....