Start

Documentation > Start






Where is the documentation ?
A) on this Website
B) just run tcbl.exe and get it !

for more, see Complete syntax

Output of tcbl.exe
Bat Builder Launcher version 0.96.5
---------------------------------
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.
     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-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+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*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 ....
          $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
          $#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.

     Counter Section     :
          $i is the file index   1 to 99999999.
          $c is the file counter 0001 to 9999.
          $C is the file counter 000000001 to 999999999.

     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.
          $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.
     [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 !

     ini= nStart nStep
          Initialize the file counter to nStart and set nStep as step !

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

     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!
        cmd=<xxx|yyy>command for each file with extension like xxx or yyy
        cmd=<z:A.*Z>command for each fileName starting with A and ending with Z
        Syntax : <('Topic' : )?'Regular Expression'>
          'Topic' is optional and can be one of 'f' 'p' 'e' 'z' 'v' see File Section
          Topic can also be F regular file,  D directory, E do not exists
          Topic can also be O File counter is Odd,  P file counter is Pair
          The default 'Topic' is the filename extension
          'Regular Expression' use a Simple Extended RegExp Library,
               matching is case insensitive.

     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 !