Take Command : Java Glossary

go to home page T words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all) ©1996-2009 2009-10-26 Roedy Green, Canadian Mind Products
Take Command Take Command
A replacement for Windows W2K/XP/W2K3/Vista/W7 command.com/cmd.exe that adds many extra features to BAT file processing. It includes tcc (née 4NT) for console batch files and a GUI equivalent. tcc used to be sold separately. Even the familiar 4nt.exe is still there, but renamed to tcc.exe. You can make a copy as 4nt.exe so you don’t have to change anything but the name of the install directory. You can upgrade from 4NT for the same price as an upgrade from an earlier version of Take Command. The current version is 11.00.33 Last revised/verified: 2009-11-10.

It comes in three versions:

Take Command Versions
Version Cost Notes
TCC/LE free console tcc version only
Take Command/LE $40.00 USD console + GUI, no debugger
Take Command $100.00 USD full version

I have only limited experience with the GUI component, (which does not apear to do much), though I bought a copy of Take Command on 2008-03-04 so everything following is about the tcc console batch component.

Redirection COMSPEC
File Timestamps Configuring
tcc Pet Tricks Links
Caveats

Redirection

It is initially of interest to Java programmers because it lets you redirect both STDOUT and STDERR to files, pipes or tees. The feature allows you to redirect the output of javac.exe, i.e. the error messages, which appear on STDERR, to a file, or to both a file and the console. Why is that important? Capturing the error messages from javac.exe can be a hassle since they scroll off the screen faster than you can read them. Ordinary > redirection won’t capture them to a file because they are going to STDERR, not STDOUT.

Once you have tcc installed you can redirect output:

or pipe output to another utility:

rem pipe stdout to more utility
javac.exe *.java | more

rem pipe output of stdout and stderr to more utility
javac.exe *.java |& more

or pipe with a tee to both redirect to a file and pipe:

When using tee with a pipe under tcc, the programs on the two ends of the pipe run simultaneously, not sequentially as in 4DOS. This means more starts producing output right away. It does not need to wait until the compile finishes.

Programs don’t have to be on the path to start them with tcc. They just need an Registry App Paths entry so there is no need to put a directory on the path unless it contains several programs. This keeps your path short, simple and fast.

File Timestamps

You can play with timestamps (improperly called ages) like this:
REM if myfile.java is newer than myfile.exe,
REM i.e. has a bigger timestamp,
REM then recompile.
REM note the the [] around parms and lack of () around the if expression.
if %@FILEAGE[myfile.java] GT %@FILEAGE[myfile.exe] call recompile myfile

tcc Pet Tricks

Here are some of the sorts of tricks I use with tcc.
Here an example of recursively descending a directory tree and processing each directory it finds.
Here is an example that compares two directories, looking for mismatches, missing, older, newer, or extra files.
Here is an example of an iteration over all directories in a tree, and within that over each file. This is a useful script to keep to trees in synch by deleting files in the destination that no longer exist in the source.

Caveats

COMSPEC

You can set up tcc as your default command processor by setting the SET environment COMSPEC parameter to:
"F:\Program Files\JPSoft\TCMD11\tcc.exe" /E:2500 /C

Configuring

Use the OPTION command to set the following parameters: Your C:\Users\user\AppData\Local\JPSoft\TCMD.INI file might look like this:
Each window controlled by tcc can override the OPTION properties independently. In the upper left corner of each window, click properties: Run tccbatch.btm to associate .bat, .btm and/or .cmd with TakeCommand. This association can be wrecked by a paranoid virus checker.

You can configure the size of the CDD window by dragging it to the size you want with the mouse. This is a bit of a surprise since 4DOS/tcc/TakeCommand has been keyboard driven since the DOS days.


CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/takecommand.html J:\mindprod\jgloss\takecommand.html
CMP logofeedback Please email your feedback for publication, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.191.100]
You are visitor number 11.