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
jedip
Junior Member
Junior Member
Posts: 3
Joined: 2008-04-09, 02:48 UTC

Post by *jedip »

I've been using TC for many years and TCBl for about 2 years. But i am a novice in a lot of ways. I've created a customised tcbl.ini w/ my many command sets, and it works delightfully. However, i have to manually create a filename list [using the .lst function in pack files (alt F5)], edit it w/ a text editor to strip the header and trailer text and delete all the trailing spaces in order to get a useable list for tcbl.exe.
In the documentation i see reference to TCBLnch.exe, but have not been able to find it.
Other plugins have installation aids that then allow the selection of a group of filenames which are passed to the function.
I know i'm probably missing something simple, but i'm stuck.
Is there an info doc somewhere that might help.
Is there a step or steps i'm missing in the setup process?
8)
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

jedip wrote:
Is there a step or steps i'm missing in the setup process?
8)
Thx for using it...

Instead of using pack file to send list of file to tcbl, you can :
- Define %L as filelist in Total Commander Command
- Select all the File to process directly in the active Total Commander TAB/
- you can use ^B view, Search Result ....

- Run the TCBL cmd from Total Commander

(if you want to save filelist, you can create a command like :
cmd : %comspec% /c
parameters : copy %L myFileList.lst )
jedip
Junior Member
Junior Member
Posts: 3
Joined: 2008-04-09, 02:48 UTC

Post by *jedip »

Thanks for your quick reply nsp.

Here is my TCBL command:
'C:\Nrep\TCBL -qi myFileList.txt clearbmp'
Where clearbmp is a command defined in my tcbl.ini
What i need in 'myFileList.txt' is a list of the filenames without path or extention.
I see %f will give me the list without path [using 8.3 filenames], but there seems to be no way to eliminate the extention at the same time.
Is there a way to open the editor and delete all the extensions [.dat] [replace w/ 'null']?
How is 'Define %L as filelist in Total Commander Command' done?
Would it be 'C:\Nrep\TCBL -qi %L clearbmp' or 'C:\Nrep\TCBL -qi %L=myFileList.txt clearbmp'?
:?:
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

jedip wrote:Thanks for your quick reply nsp.

Here is my TCBL command:
'C:\Nrep\TCBL -qi myFileList.txt clearbmp'
Where clearbmp is a command defined in my tcbl.ini
What i need in 'myFileList.txt' is a list of the filenames without path or extention.
TCBL works with full filename (path \ name . ext ), you have $ "parameter" that can be used to get what you need in your command section....
See Info on TCBL

Code: Select all

ex :
  $f replace the complete filename (with path).
  $p replace the path.
  $n replace the file name.
  $e replace the file extension without preceeding '.'
  $x is filename with path but without extension.
  $z is filename without extension. 

  ex ren $f $z.toto
  change the extension of a filename to toto

  ex ren $f $z
  remove the extension 
Hope this help, you will probably have to change your clearbmp command !
jedip wrote:I see %f will give me the list without path [using 8.3 filenames], but there seems to be no way to eliminate the extention at the same time.
Is there a way to open the editor and delete all the extensions [.dat] [replace w/ 'null']?
How is 'Define %L as filelist in Total Commander Command' done?
Would it be 'C:\Nrep\TCBL -qi %L clearbmp' or 'C:\Nrep\TCBL -qi %L=myFileList.txt clearbmp'?
:?:


See "To use From Total Commander" section in the TCBL info Site....
in your case :

Code: Select all

	Command : C:\Nrep\TCBL.exe
	parameter : -i %L clearbmp
use latest version of TCBL (if you do not plan to use wdx plugin, the update is enough ! )
(Do not forget to change your clearbmp command using the right parameter $z )!

(TCBLnch is the old name of tcbl) to get help just type tcbl in a cmd console.

-- edited to fix wrong url --
jedip
Junior Member
Junior Member
Posts: 3
Joined: 2008-04-09, 02:48 UTC

Post by *jedip »

:D
Big time THANKS nsp

That info solved my problems.
TC is great, and the tcbl program really tops it off!

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

New version of TCBL.

Post by *nsp »

New version of 0.90 TCBL.

New command added for folder and drive...

Code: Select all

		$p! replace the path without the Drive Letter starting at first \.
		$p1 $p2 .. $pi.... $p9 replace the previous i folders 
		ex: for Z:\f9\f8...\f2\f1myFile.ext  
		->$p1 is f1\  $p2 is f2\f1\  
		->$p3 is f3\f2\f1\ .... .
		$v replace the Drive/Volume Letter without ':'.
For more info and download : http://tccfestuff.free.fr
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: New version of TCBL.

Post by *nsp »

// the new version is beta 0.95//
added : added file attributes and dates $shortcuts
added : added List File $shortcut
added : added file/folder filter for ini scripts
added : added alternate file call with wdx.
fix: multiple calls

Code: Select all

		$#T is the File type (Folder | Regular File | Pipe | not in FileSystem
		$#A is the file attributes RWX 
		$#c is the creation date-time of the file
		$#m is the last modification date-time of the file
		$#a is the last access date-time of the file
		  all previous date-time use the following format YYYYmmDD-HHMMSS

		$L is the input file list.



		Call super wdx with an alternate file $! WdxExpression [filename]%$!
			- filename must point to an accessible file
			- [filename] must be glued to the terminating $!
			- filename must exist before tcbl build the bat
...

For more info and download : http://tccfestuff.free.fr
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

Thanks for the new version.
What am I doing wrong in this example using SuperWdx?

Code: Select all

; in tcbl.ini
[junction]
cmd=@echo $!%Reparse Point Target@NL_Info.wdx%$!
cmd=@echo $!1$!
end=pause

;in super_wdx.ini
[Plugins]
NL_Info.wdx=%commander_path%\plugins\wdx\nl_info\nl_info.wdx
[Super]
WdxDir=%commander_path%
CustomFoldersView=0
CustomColumns=1
[Column #1]
<DIR>=%Reparse Point Target@NL_Info.wdx%

;in DEFAULT.bar
button53=%commander_path%\TOTALCMD.EXE,2
cmd53=%commander_path%\util\TCBL\tcbl.exe
path53=%commander_path%\util\TCBL\
menu53=tcbl junction
param53=-I tcbl.ini %L junction
I select a junction point, press button53 and this is what I get:

Code: Select all

"ERROR!"
"C:\test\TargetFolder"
pause
Press any key when ready...
So the first cmd= line fails, while the second one works. What is wrong with the first cmd= line? Perhaps TCBL doesn't support embedded spaces in the field name? If so, could you please support them?

Another issue: why is the @echo output in double quotes? How can I get rid of the double quotes?

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

Post by *nsp »

sgp wrote:Thanks for the new version.
What am I doing wrong in this example using SuperWdx?
......
Another issue: why is the @echo output in double quotes? How can I get rid of the double quotes?

Thanks, TCBL is extremely useful.
Thx for using it !

It is a bug with wdx having space on column name...., i did a small fix you can download it from the tcbl update Zip

If you want to get rid of " you can use the q option which means do not auto-quote strings see tcbl wiki
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

sgp wrote:......
Another issue: why is the @echo output in double quotes? How can I get rid of the double quotes?
....
additional info :
If you only need to do file list, you can use franck 8244 packer plugin that do very good job WdxInfoPacker (it is designed for this task ! )
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

nsp wrote:i did a small fix
Thanks. Fix confirmed!
If you want to get rid of " you can use the q option
I had tried it before and always got an error. I hadn't realized that it can't be entered as-q -I file.inibut must be entered as-qI file.ini.

Perhaps this question has been asked before. Is it possible to change the command processor that TCBL launches once the script is created? I see that right now TCBL starts %CmdSpec% /c %TEMP%\tcbl_(random).bat. I see no reason why the script building engine needs to be restricted to CMD statements, it could create any kind of scripts, for instance VBS. At which point TCBL could start the vbs script automatically if TCBL allowed for specifying the command-line to start and the script filename extension.

Perhaps it would be enough to add a tcblrun.bat option - similar to tcbledit.bat:

Code: Select all

REM  in tcblrun.bat - start a vbs script
start %~dpn1.vbs
No, this is not quite enough yet, because I still haven't told TCBL to name the script file with extension .vbs. Still, it seems that this opportunity isn't too far away, what do you think?

EDIT:
Very funny, I seemed to remember that perhaps I had had something to do with regard to tcbledit.bat, so I went back into this thread and found, on August 29, 2006, that you actually added tcbledit.bat in response to a request of mine, thanks again!

One more request, it would be useful if you could add an internal variable pointing to TCBL start folder. This way I could write scripts that correctly reference that folder even if they are not started from TC.

Using %%commander_path%%\TCBL in TC's parameters line isn't sufficient because the environment variable isn't expanded until the batch file runs, which means that if the batch file was started outside of TC %commander_path% wouldn't be defined.

EDIT 2:
I discovered a work-around. I can use $0 from within an ini section to get the full path of TCBL.exe - and from there the folder path. This isn't documented in the readme file. Still, a direct internal variable would be preferable, try this:

Code: Select all

; in tcbl.ini
pre=set myfolder=$0
pre=set myfolder=%myfolder%\..
pre=echo %myfolder%
pre=DIR /w "%myfolder%"
pre=pause
pre=exit
While the resulting batch file does work as intended, %myfolder% is set to the invalid path ...\TCBL\tcbl.exe\.. DIR accepts it even if it's invalid, but not all programs - or alternate script processors - may.
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

sgp wrote: ...
I see no reason why the script building engine needs to be restricted to CMD statements, it could create any kind of scripts, for instance VBS. At which point TCBL could start the vbs script automatically if TCBL allowed for specifying the command-line to start and the script filename extension. .....
Perhaps it would be enough to add a tcblrun.bat option - similar to tcbledit.bat:....what do you think?
For vbs, powershell, python, ... it is easy to use the file list given by tc to do all i do with tcbl.....
But if i have to implement it, i will add an option part for each commands stored in the ini.
Probably No-quote, codepage, debug, Result file : folder / prefix / extension, command to launch ...
sgp wrote: One more request, it would be useful if you could add an internal variable pointing to TCBL start folder. This way I could write scripts that correctly reference that folder even if they are not started from TC.
TCBL start folder is the current folder ! you can use %CD%

Code: Select all

SET startFolder=%CD%
TCBL installation folder is the one you installed tcbl. It is normally known (unless you execute it from removable drive) ? You have the $0 that get tcbl.exe fullname.

Code: Select all

pre=for /F "delims=" %%i in ( "$0" ) do set TCBLFLDR=%%~dpi

Remark:
If you use the tcbl.ini (the one inside tcbl installation folder) you can just use -i option (not -I ini_file)

Code: Select all

COMMAND:%commander_path%\tools\tcbl\tcbl.exe
PARAMETER: -qi %L myCmd param1 param2 param3.....
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

nsp wrote:But if i have to implement it, i will add an option part for each commands stored in the ini.
Probably No-quote, codepage, debug, Result file : folder / prefix / extension, command to launch ...
Yes, that's more flexible.
TCBL installation folder is the one you installed tcbl.
Yes, I wrote "start folder" but you understood that it was the "installation folder" that I was after. Thanks for the code snipped.
tcvol
Junior Member
Junior Member
Posts: 67
Joined: 2009-02-02, 12:35 UTC

Post by *tcvol »

ok i have a small display bug/issue:

as i use a lot of directory names of german nature, many of those names have "umlaute" like ö,ä,ü,ß,Ö,Ä, ...

the thing is that they are manipulated as desired (packing, renaming, ...) but the console display is not correct.

i am using the following:
command: %commander_path%\tcbl\tcbl.exe
parameters: -I c:\Programme\t7\TCBL\test.ini %L testumlaute

[testumlaute]
pre=@echo on
cmd=echo n: $n
cmd=echo f: $f
cmd=echo renaming $f to $z
cmd=ren $f $z
end=PAUSE

before:
c:\temp\test\Ärmelkanal.TEST\
c:\temp\test\Neue Mühlen S01.TEST\
c:\temp\test\Schneeweiß.TEST\

after:
c:\temp\test\Ärmelkanal\
c:\temp\test\Neue Mühlen S01\
c:\temp\test\Schneeweiß\

console output:
link to the image to follow, since i have to wait 1 message & 1 day ;-)

anything i can do here, or is it tcbl.exe?
i already tried to play with codepage commands .. but no luck so far.

thx for this great addon!!
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

tcvol wrote:ok i have a small display bug/issue:

as i use a lot of directory names of german nature, many of those names have "umlaute" like ö,ä,ü,ß,Ö,Ä, ...

the thing is that they are manipulated as desired (packing, renaming, ...) but the console display is not correct.

...

anything i can do here, or is it tcbl.exe?
i already tried to play with codepage commands .. but no luck so far.

thx for this great addon!!
Known issue :(
the trouble is that %L, the generated bat file and the ini file are done with windows codepage...

alternatively, you could use output file echo >> myFile.log to get your result with good names !

I will give a closer look on this...
Post Reply