Take Command : Java Glossary

The CurrCon Java Applet displays prices on this web page converted with today’s exchange rates into your local international currency, e.g. Euros, US dollars, Canadian dollars, British Pounds, Indian Rupees… CurrCon requires an up-to-date browser and Java version 1.7 or later, preferably 1.8.0_05. If you can’t see the prices in your local currency, Troubleshoot. Use Chrome for best results.
Take Command Take Command

A replacement for Windows W2K/XP/W2003/Vista/W2008/W7-32/W7-64/W8-32/W8-64 command.com/cmd.exe that adds many extra features to BAT (Batch) file processing. It includes tcc.exe (née 4NT) for console batch files and a GUI (Graphic User Interface) equivalent. tcc.exe used to be sold separately. Even the familiar 4nt.exe is still there, but renamed to tcc.exe. The current version is 16.01.46 Last revised/verified: 2014-04-14.

It comes in two versions:

Take Command Versions
Version Cost Notes
TCC/LE free console tcc version only
Take Command $100.00 USD full version

I have only limited experience with the GUI component, (which does not appear to do much), though I bought a copy of Take Command on 2008-03-04. Within that you can download the 32 or 64-bit version. Everything following is about the tcc console batch component. Take Command/LE has been discontinued.

Redirection Recursively Running a Utility on a Directory Tree
File Timestamps Caveats
tcc Pet Tricks COMSPEC
Recursive Directory Processing Configuring
Directory Diff Multitasking
Orphan Deleter Links

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.

To calculate, add, subtract, multiply, divide use the @EVAL function.

Recursive Directory Processing

Here an example of recursively descending a directory tree and processing each directory it finds.

Directory Diff

This script compares two directories to detect missing, older, newer, or extra files.

Orphan Deleter

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.

Recursively Running a Utility on a Directory Tree

Here is the bloutall.btm script I use frequently. It runs the blout.exe utility on every file in the current directory, or optionally on every file in the directory tree. It only runs it on files with an extension that implies than contain readable text. blout.exe gets rid of excess blank lines and normalises line ending separators. I could also have implemented it with the simpler GLOBAL command.

Copying just selected Dirs from one tree to Another

Often you don’t want to process a whole directory true, just do the same thing to some or most of the directories in it. Here is an example where I provide a list of dirs I want to copy to the corresponding spot in another tree.

Caveats

COMSPEC

You can set up tcc as your default command processor by setting the SET environment COMSPEC parameter to:
X:\Program Files\JPSoft\TCMD13x64\tcc.exe /E:2500 /C
You can also do this more easily with X:\Program Files\JPSoft\TCMD13x64\tcmdbatch.btm

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 (Disk Operating System) days.

MultiTasking

Especially if have multiple CPU (Central Processing Unit) cores, you can speed things up by dividing your work between several *.btm files and running the simultaneously. You then need to launch them, wait for them to finish, and keep them from interfering with each other. See Hints on how to coordinate tasks.


available on the web at:

http://mindprod.com/jgloss/takecommand.html
ClustrMaps is down

optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\takecommand.html
logo
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy.
Blog
IP:[65.110.21.43]
Your face IP:[54.204.68.109]
You are visitor number 11.