Personal Help File

This is a .BTM that allows me to keep notes, and display them, at the Take Command Console.

I have attached, which is a sample database of a few notes.

Your notes can be added to the database, deleted from the database, modified, etc.

This is a work in progress, so feel free to copy the .btm, and make changes to the source to fit your needs.

I use the 7-Zip File Manager (7zFM.exe) to manage the file (database).

Start out by running the program with the contents argument;
e:\utils>myhelp contents
2022-03-17  07:13            228   29%  32odbc.tcc.btm
2022-03-17  07:15            228   25%  32RegSvr.tcc.btm
2022-03-17  06:46            155   19%  4desc.tcc.btm
2022-03-17  08:00          5,151   55%  del.tcc.btm
2022-03-17  08:02          3,657   68%  forfiles.tcc.btm
2022-03-17  08:53          1,293   57%  more.tcc.btm
2022-03-17  07:29            893   52%  RegSvr32.tcc.btm
2022-03-17  07:29          1,195   53%  regsvr42.tcc.btm
2022-03-17  06:23          1,598   46%  start.tcc.btm
2022-03-17  07:57            738   46%  SysExp.tcc.btm see what is in the database.

Now, I want to see my notes for start, so;
myhelp start
...shows me my notes for start.

As we know, the TCC Command Line Help lacks much of what is in the TCC Help File, (start /?) and that the TCC Help File has much more detail.

With my Personal Help File, I can now get more detailed help about Start at the command line.


:: This .btm allows me to view the help notes I have created for commands on my system.
:: The database is a ZIP file,, which contains the help notes.
:: I create a text file, for example, start.tcc.btm (find the contents of start.tcc.btm at the bottom of this .btm)
:: Once I have the text file completed, I ZIP it into the file.
:: You don't have to use ZIP. You can use one of the other TCC archivers if you want. (7ZIP, TAR, etc.)
@echo off
:: The location of the file.
set myhelp=e:\utils\
:: The un-archiver I am using
set unzip=unzip

:: Make sure that exists.
iff not exist %myhelp then
  echo Could not find %myhelp

:: No argument was entered from the command line, so display usage.
iff %# eq 0 then
  echo USAGE: %_batchname contents
    echo        %_batchname command
    echo        %_batchname @function

:: Extract the contents of the file to contents.txt
:: /V View the list of files in the archive (date, time, size, compression ratio, and filename).
::  If the zip file is password protected, UNZIP will append a * after the filename. 
%unzip %myhelp /v > %temp\contents.txt
:: Display the contents of the file. 
iff %1 eq contents then
  if exist %temp\contents.txt type %temp\contents.txt |
:: Look for the note that was entered as an argument on the command line.
ffind /kvmt"%1.tcc.btm" %temp\contents.txt > nul
:: Save the number of files found.
set ffind_matches=%_ffind_matches
:: If the contents.txt file exists, delete it quietly, not needed anymore.
if exist %temp\contents.txt del /q %temp\contents.txt
:: If the file for the command we want does not exist in
iff %ffind_matches eq 0 then
  echo Could not find %1

:: UNZIP the file from for the command that we want.
:: /C Display (on standard output) the contents of a file in the zip archive. 
:: /O Overwrite existing files. UNZIP normally prompts before overwriting an existing file; /O will suppress the prompt. 
%unzip %myhelp /c /o %1.tcc.btm > %temp\%1.tcc.btm

:: If the extraction of the file was successful...
iff exist %temp\%1.tcc.btm then
    :: Display the requested help page.
  gosub "%temp\%1.tcc.btm" HelpText
  echo Could not find %temp\%1.tcc.btm

:: If the requested help page file exists, delete it quietly, not needed anymore.
if exist %temp\%1.tcc.btm del /q %temp\%1.tcc.btm


:: The contents of the start.tcc.btm file
:: Note that I am using the TCC internal list command to display the contents of the file.
::  You can use whatever viewer you desire. Just replace *list with your viewer.
::  For example, using will display a page at a time.
TEXT | *list
Start a program in another session or window.

    /POS=x,y,width,height /L /LA /LD /LF /LH /MONITOR=n /RUNAS user password /SIZE=rows,cols /TAB /TABNA /WAIT /WIN
    /PGM ]
    "progname" [command]

title        Title to appear on title bar
path        Startup directory
progname    Program name (not the session name)
command        Command to be executed by progname

/ABOVENORMAL    Priority
/LF        Local functions
/AFFINITY    Multiple CPUs
/LH        Local history list
/B        No new console
/LOW        Priority
/BELOWNORMAL    Priority
/MAX        Maximized window
/BREAKAWAY    Break away from job
/MIN        Minimized window
/C        Close when done
/MONITOR    Monitor to use
/COLOR        Default console colors
/NODE        NUMA node
/D        Startup directory
/NOPINNING    Don't pin to taskbar
/DESKTOP    Start desktop
/NORMAL        Priority
/ELEVATED    Start as admin
/PARENTAFFINITY    Inherit parent's affinity
/FEEDBACK    Cursor feedback mode
/PGM        Program name
/HIGH        Priority
/POS        Position of window
/I        Inherit environment
/REALTIME    Priority
/INV        Invisible window
/RUNAS        Run as other user
/JOB        Start process in job
/SIZE        Screen buffer size
/K        Keep when done
/TAB        Start in Take Command tab window
/L        Local lists
/TABNA        Start in inactive Take Command tab
/LA        Local aliases
/WAIT        For session to finish
/LD        Local directory history
/WIN         Windowed session


    7.7 KB · Views: 12

Similar threads