Bat Builder Launcher version 1.04
---------------------------------
Build & Launch a bat script for each file present in the ListFile.
---------------------------------

usage: 
tcbl [Option] [cmd file] InputFile 'command name or command line'
	[cmd file]	: Alternate ini file containing TCBL script (-I is present !).
	InputFile	: File containing a list of file/folder name.
			if "con" is supplied input is taken from console.
			if "-" is supplied tcbl can be used from a pipe.
	command name and 1 to 9 parameters	: is used with the ini file definition
	command line	: is the 'encoded' bat script where
	Structure Section	:
		' $( ' is the separator between initialization and repeated commands.
		' )$ ' is the separator between repeated and finalization commands.
		$; is the separator between 2 line.

	File Section	:
		$f replace the complete filename (with path).
		$p replace the path.
		$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\f1\myFile.ext  
		->$p1 is f1\
		->$p2 is f2\f1\  
		->$p3 is f3\f2\f1\ .... .
		$p+1 $p+2 ....$p+9 replace the previous i paths 
		ex: for Z:\f9\f8...\f2\f1\myFile.ext  
		->$p+1 is Z:\f9
		->$p+2 is Z:\f9\f8 ....
		$p-1 $p-2 .. $p-i.... $p-9 replace the previous i paths 
		ex: for Z:\f9\f8...\f2\f1\myFile.ext  
		->$p-1 is Z:\f9\f8...\f2\
		->$p-2 is Z:\f9\..\f3\... .
		$p*1 $p*2 ....$p*9 replace the previous i paths 
		ex: for Z:\f9\f8...\f2\f1\myFile.ext  
		->$p*1 is f8...\f2\f1
		->$p*2 is f7\...\f2\f1 ....
		$p#1 $p#2 .. $p#i.... $p#9 replace the previous i folders 
		ex: for Z:\f9\f8...\f2\f1\myFile.ext  
		->$p1 is f1
		->$p2 is f2 
		->$p3 is f3 .... .
		$v replace the Drive/Volume Letter without ':'.
		$n replace the file name.
		$e replace the file extension without preceding '.'
		$x is $f without extension.
		$z is $n without extension.

		$#T is the File type (Folder | Regular File | Pipe | not in FileSystem
		$#A is the file attributes RWX 
		$#S[bKMG] is the file size in byte, Kilo,Mega,Giga 
		$#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.
		$- is the output file name.
	Clipboard Section	:
		$K is clipboard (No check is done if nultiline !!!)
	Counter Section	:
		$i is the file counter   1 to 99999999.
		$c is the file counter 0001 to 9999.
		$C is the file counter 000000001 to 999999999.
		$i- $c- $C- index without ini config.

	Date Time Section	:
		$D is the day number dd.
		$M is the month number mm.
		$Y is the year number yyyy.
		$w is the week day.
		$W is the week number.
		$d is the date yyyymmdd.
		$t is the time hhmmss.
		$H is the time hhmm.
		$T is the long date and time.

	Redirection Section	:
		$I is redirection (<)
		$O is redirection (>).
		$A is redirection (>>).
		$P is redirection (|).

	Use WDX Section	:
		$! is the begin/end delimiter for calling content plugin using super_wdx.

		the syntax is the same as super_wdx  :
		   $! Field:%fieldName@wdxAddon.wdx%  Name:%name@filesys.wdx%$!

		the syntax to use super_wdx column is :
		   $!nnn$! call SUPER_COLUMN #nnn (from 1 to 999)

		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

		this WDX feature is experimental and does not support languages :(

	To use a $ in a command, use $$ instead.

	All expression with $[fpnxz] are automatically quoted (if 'q' is not set).

	[Option] (d)?(e|E)?(x)?(q)?(Q)?(k)?(i|I)? (codepage number)? (to force CP):
		'q' do NOT quote $expression
		'Q' do NOT quote $expressiont and do note replace % by %%
		'd' debug only !
		'e' edit
		'E' edit using the tcblEdit.bat file.
		'p' pause before execution !
		'x' no execution, should be used with e or E option !
		'i' signal usage of TCBL.INI file.
		'I' signal usage of aternate ini file.
		'n' null option for filename starting with "-"))
		'k' Keep output file !
	--------------------------------------------------
	INI FILE definition

	You can use $1 to $9 and $* as parameters inside <pre>,<cmd>,<end> commands.
	You can use $_1 $_2 to $_9 as "internal param." inside <ini>,<pre>,<cmd>,<end> commands.

	[CmdName]
		The section for the command CmdName

	;  any comment you want to add.....
		This is a line used for commenting your script.
		It is not kept in the final script !

	----- Command initialization ----
	ini= nStart nStep
		Initialize the file counter to nStart and set nStep as step (space is mandatory)!

	ini=# TimeFormatStr
		Initialize time format for file information


	ini=S Number
		Number of significative digits for file size $#[bKMG],
		from 1 to 15  set to 6 by default.


	ini=S S
		use SI notation (10^3 instead of 2^10 ) for file size information $#[bKMG].


	ini=S ,
		set ','  as decimal separator for file size $#[bKMG].


	ini=C codepage
		set codePage.


	ini=p 
		pause TCBL before end.


	ini=q 
		do not quote TCBL variable.


	ini=Q 
		do not quote and do not modify % sign for TCBL variable.


	ini=o outputfile
		file used as output

	ini=a outputfile
		file used as output in append mode. (will not be deleted)


	ini=k
		Keep output file

	ini=d
		delete output file, specially used in append mode.


	ini=x Command to Execute
		command used to launch output file

	ini=X Command to Execute with all parameter
		command used to launch output file using $- inside command.

	ini=x
		do not execute any command


	ini=t <Console Title>
		set console title.


	ini=1 Title \t Query \t Default Value
	ini=2...Separator is TAB (\t,	)
	...... Graphical input Box for Internal param $_1 $_2 .. $_9
	ini=9 ...... same as above from _1 to _9


	ini=1F Title \t Filter \t Initial PATH
	ini=2f...Separator is TAB (\t,	)
	...... Graphical File Chooser for Internal param $_1 $_2 .. $_9
	.....sep. for Filter is | ex:All Files|*.*|Text|*.txt;*.rtf;*.doc
	....F means file must exist (used for input)
	....f means file can not exist (used for output).

	------  PREPARATION     ------
	pre=command for initialization
		This is a line used for initialization script !
		You can have as much <pre> command as you like!

	------- FOR EACH FILE ! ------
	cmd=command for each file
		This is a line used and repeated for each entry file !
		You can have as much <cmd> command as you like!
	   The default 'Topic' is the filename extension
	   'Regular Expression' use a Simple Extended RegExp Library,
	   matching is case insensitive.
	   -- < Filtering Capabilities > -- 
	   Syntax : <('Operator'?'Topic':)?'Expression'?>
		Optional Operator can be '!' not, '=' Egal, '#' different.
		'Topic' can be one of 'f' 'p' 'e' 'z' 'v' for File Section 
		and regular 'Expression' matching the file.
		Topic can be 'F' regular file, 'D' directory, 'E' not Exists
		Topic can be 'O' internal File index is Odd,  'P' is Pair
		Topic can be 'o'  Index MODULO Divisor = Rest.
		Topic can be 'i' File Index in ranges
		Topic can be 's' Size is >= to the number in byte
	   cmd=<xxx|yyy>command for each file extension like xxx or yyy
	   cmd=<z:A.*Z>command for each file starting with A and ending with Z
	   cmd=<v:A|B|E>command for each fileName on Drive A: or B: or E:
	   cmd=<o:5 0>command for each file where index MODULO 5 = 0
	   cmd=<!o:10 5>command for each file where index MODULO 10 <> 5
	   cmd=<i:1 - 100>command for each file where index is between 1 to 100
	   cmd=<i:5> command for each file where index is 5
	   cmd=<i:1 - 100>command for each file where index is between 1 to 100
	   cmd=<!i: 101 - 199> command for each file where index is less than 101 or greather than 199
	   cmd=<s:1024>command for each file where size >= 1024 bytes
	   cmd=<!s:1024>command for each file where size < 1024 bytes
	   cmd=<=s:1.0E5>command for each file where size = 1.0E5 bytes
	   cmd=<#s:1024.0>command for each file where size <> 1024 bytes
	   cmd=<=s:1024 - 4096>command for each file where size is in [1024,4096] bytes
	   cmd=<!s:1024 - 4096>command for each file where size less than 1024 bytes or greather than 4096 bytes

	----------- FINALIZATIOIN ---------
	end=command for finalization
		This is a line used for finalization script !
		You can have as much <end> command as you like!

	You can have 0 to n 'initialization line' 
	plus 0 to n 'command line'
	Plus 0 to n 'finalization line'.
	For more info see the TCBL.ini sample file


-----------------------------------------------------
Sample (1): tcbl -d .\FileList.lst type $f $AallFiles.txt
Sample (2): tcbl -eq .\FileList.lst ren $f $n.not_used
Sample (3): tcbl -d1251 .\FileList.lst echo $z [$e] $A$p\SelectedFiles.txt
Sample (4): tcbl .\FileList.lst echo $$$z$$$e$$ 
Sample (5): tcbl .\FileList.lst copy $f $p\S1 $; copy $f $p\S2 $; ren $f $n.saved 
Sample (6): tcbl .\FileList.lst copy $f $p\$d_$c-$n
Sample (7): tcbl .\FileList.lst copy echo --START-- $( echo the file is $n in $p )$ echo --END--
Sample (8): tcbl -Ei .\FileList.lst IniCmd "Parameter 1" "%T" .
Sample (9): tcbl -I c:\totalcmd\tools\tcbl\imagik.ini .\FileList.lst IniRotateL "+45" "%T" .
Sample (10): tcbl -q.\FileList.lst @echo $f $!CRC32='%GetCrc32FromFile.NoBrackets@crc32tag.wdx%' $!  $Adetails.txt


TcblEdit.bat file contain the command for launching your alternative editor !
If tcbl is used from TotalCmd Button/command, filelist.lst is <<%L>> !

Enjoy and use the bat builder/launcher !

To display of accentuated letter, set font like LucidaConsole or Consolas..

[paused] If you launched from TC RightClick on properties !
