interesting TCStarts.btm

Apr 2, 2011
North Carolina, USA
I have seen a few interesting TCStarts, at least the first few lines of some, and thought it might be nice to have people post theirs, after removing stuff that is not wanted to be shared.
May 20, 2008
My actual TCStart.btm is only a couple of lines:
@echo off
call %@path[%comspec]..\DAT\JPStart.BTM
My actual TCExit.btm is similarly abbreviated. I have been using TCMD since the 4DOS days. The install directories keep changing with major version included in the folder name and I often have multiple versions installed simultaneously, especially with the overlap of use when a new version comes out. It became tiresome to keep multiple copies in sync. So, I created the DAT folder and put the main files for start, exit, alias, function, etc. in that. That relieved the version sync issue.

As for what the JPStart does, it checks and does a few things. Caveat: It's legacy and should probably be cleaned up some. For an idea of why some of this is as it is, my typical install path is C:\JPSoft\TCMD##. Here is the start of my BTM:
@echo off
REM Abort if transient
if %_transient EQ 1 goto end

REM Set paths for JPSoft and root folders
set /e JPPath=%@full[%@path[%_cmdspec]..\]
set /e RootPath=%@full[%JPPath\..\]

REM Log start of TCC
if not direxist %JPPath\Log md %JPPath\Log
echo %_date %_time PID:%@format[5,%_pid]-Start(1)  SHRALIAS:%_shralias  Ver:%_4ver.%_build  Title:%_wintitle) >> %JPPath\Log\tcc.log

color bright green on black

REM If shalias not loaded, load it now along with aliases and functions
iff %_shralias eq 0 then
    alias /R %JPPath\DAT\alias.dat
    iff %_cmdproc NE TCCLE then
        function /R %JPPath\DAT\function.dat

prompt $+$P$G%%@if[%%@len[%%_cwd] GT 25,$_,``]
It also sets the some env vars and logs the BTM ending, Start(2), as at the Start(1) above. In the remainder of the BTM, there is a bunch of stuff that has been commented out. For example, at one point, TCMD did not remember window position. I like mine in the upper right of the desktop. So, there was code to check screen resolution and reposition the window. The code above and in another section for TCCLE is also redundant as I no longer use that, but it's still there just in case. I don't think the RootPath env var is used any more either. I keep my TCC tab width at 80 columns, which is why I have the wrap in the prompt. My start BTM is nothing really fancy, but sufficient for my needs at the moment.
Nov 2, 2009
Since you ask nicely, here's mine. A couple relics here and there, and nothing too fancy (except... the prompt, which is as monstruous as I like it to be).

@echo off

iff "%_transient" == "0" then
  CHCP 1252
  REM CHCP 65001

  function substituted=`%@if["%@left[3,%@truename[%1\]]"=="%1\",0,1]`

  unsetarray /Q COLORES_DE_DISCOS
  setarray COLORES_DE_DISCOS[26]
  call %HOMEDRIVE%%HOMEPATH%\TCMD\colores_de_discos_para_%_host.btm
  function colorDeDisco=`%@if["%@substituted[%1]"=="1",36;2,%COLORES_DE_DISCOS[%@eval[%@ascii[%@instr[0,1,%1]]-65]]]`


  set PATH=%PATH%;C:\LDC

  alias /R "%HOMEDRIVE%%HOMEPATH%\TCMD\alias.txt"
  REM history /R "%HOMEDRIVE%%HOMEPATH%\TCMD\historia.txt"

  set ncmd=0
  alias post_exec=`set ncmd=%@inc[%ncmd] & title %ncmd`

  set TCMD_OFICIAL=21.0
  prompt `%@exec[@pwd]`$e[37;1m$d$s$t$e[0m$s%_dos%:%_dosver%.%_osbuild%$s%_cmdproc%:$e[`%@if["%_version" eq "%TCMD_OFICIAL",37,33;41];1m`%_4ver%.%_build%$e[0m$s$e[36;2m$u@%%_ip%%$e[0m$s%_pid%$s$e[33;2m$z$e[31;1m$+$e[0m$_{%%ncmd}$s$e[36;2m%_host%$e[0m$s$e[32;1m$r$e[0m%@if["%_elevated" eq "1",$s$e[43;5;30;2mELEVATED$e[0m,]$s$P$g

  echo I am ready, Master.


The prompt uses @pwd, which is defined in alias.txt as:

pwd=for %A in (%_ready) do ( echo ^e[%@colorDeDisco[%A]m%@format[-12,%@label[%A]] %@if["%@substituted[%A]"=="1",*, ]%@cwds[%A]^e[0m )
Similar threads
Thread starter Title Forum Replies Date
gworley rd (Remove Directory) gives interesting error: Support 2
thorntonpg @eval function, interesting results any explanation? Support 3
vefatica Interesting day (off-topic) Support 2
Kachupp interesting Support 0
MickeyF equivalent to TCSTART.btm for TCMD? Support 4
vefatica Console not redrawn in BTM or with multiple commands Support 4
Joe Caverly Embedding an .EXE (or other file) into a .BTM Support 8
Charles S. Roaten Problems with TCSTART.BTM Support 1
P Kill all other instances of tcc from a btm batch file Support 2
C TCC 26 BATCOMP BTM problems? Support 5
B IF command problem in tcexit.btm Support 9
vefatica WAD DIR.BTM? Support 11
vefatica BTM, elevated, console window caption? Support 4
I BTM slower than BAT? Support 14
D btm file command line augments comparing for string or math. Support 12
D check for network tcstart.btm and load if newer Support 3
Craig Fitzgerald Problems using tcstart.btm Support 3
vefatica Installer sets BTM associations wrongly Support 4
O I cannot use links to .btm files Support 5
CWBillow Can't right-click a BTM Support 7
C NE1 have BTM to remove %appdata\JP Software\ etc... Support 0
JohnQSmith ALIAS /R in TCSTART.BTM Support 9
Paul Berwanger BTM Bugs Support 2
M Drag and Drop for .BTM scripts Support 10
D WAD START /ELEVATED "Title" /PGM "job.btm" Support 6
C How to? run a BTM in elevated, inv tcc tab window Support 9
Roedy How to? Understanding BTM file properties Support 0
Fross GetOpt.btm Support 0
Roedy BTM file encoding Support 13
C How to? Add date/time to custom tpipe based BTM Support 1
thedave Problem chaining piped FIND commands in BTM Support 7
P Concatenating strings in a BTM Support 3
C Cmpr_Del.btm need help understanding UDF..... Support 2
R Unable to start any BTM file from Explorer Support 5
G .BTM association doesn't work anymore Support 1
A 18.00.21 tries to cancel TCSTART.BTM Support 3
B How to? why does my BTM stop Support 2
redwdc btm won't run in ver. 17 but works in ver. 16 Support 11
I How to? Bat Works but BTM Doesn't Support 6
C Documentation .CMD .BAT .BTM Support 15
C TCMD17x64\tcchere.btm Support 3
T How to? sort history in tcexit.btm Support 22
Mezlo help with btm fragment Support 9
C REQ: tcmdhere.btm mod Support 11
vefatica Why isn't TCSTART.BTM run? Support 8
vefatica BTM file hoses logon session Support 12
C move_all.btm Support 34
J Passing % character through command line to .btm Support 5
C @CharlesDye - RegTweaks.btm n/w Support 11
C z_newmove.btm questions Support 6

Similar threads