NEW VERSION OVERVIEW -  Take Command 10.0

 

This is a summary of the compatibility fixes and new features. For complete details, see the appropriate topics in this help file.

 

The new features that are supported in TCC/LE (including the TCC/LE component of Take Command/LE) are marked with a *.

 

 

Feature List:

 

*Take Command and TCC startup is faster.

 

*Most operations in Take Command and TCC are faster.

 

The quick help displayed on the TCMD status bar will now also identify aliases and display their value.

 

Holding down the Ctrl key while scrolling the mouse wheel will now change the font size in the Take Command tab windows. Note that not all apps will be happy about you randomly changing their font (and thus the console window size)!

 

Increased the maximum number of TCMD startup tabs from 10 to 20.

 

You can now drag files from the desktop to the List View window.

 

Added an option to set the popup window font for Take Command and TCC (Windows page of their configuration dialogs).

 

Added support for specifying attributes (/A:...) and ranges in the TCMD Filter combobox. (The syntax is the same as in TCC.)  The attribute and range switches must come before the filename wildcards (or regular expressions).

 

The TCMD filter combobox now saves its entries (up to 10) and restores them when TCMD restarts.

 

When starting a tab, if the filename is "TCC.EXE" or "TCC" and there is no path specified and TCMD cannot find the filename in the path, it will default to running TCC.EXE in the TCMD installation directory.

 

The "Up" button on the Take Command toolbar will now take you to "Computer" if you're already at the root directory of a drive.

 

The Take Command "Find Files" dialog "Edit" button will now try to open the file with its associated app. If that fails, Take Command will use Notepad.

 

Added support for array variables. See SETARRAY / UNSETARRAY, SET, @ARRAYINFO, @EXECARRAY, and @FILEARRAY for details.

 

Added internal support for Python (.py). You must enable Python in the OPTION / Startup dialog.

 

Added an "in-process" pipe. This works like the old DOS pipes, by creating a temporary output file, redirecting STDOUT to that file, and then redirecting the temp file to STDIN of the following command.

The syntax is:

 

command1 |! command2

 

(This the same as doing "command1 > temp.dat & command2 < temp.dat", but is easier to type & to read.)  There are some disadvantages to using this type of "pseudo-pipe" -- it will usually be slower than a true pipe; it will use some disk space for its temp file; and "command2" will not be started until "command1" has exited.

 

Added "here-string" input redirection to send a string to the program's standard input. The syntax is:

 

cmd <<< this is some input text

 

The popup windows (history, directory history, fuzzy directory search) now save their new size & position when moved.

 

*File & disk size variable functions (@DISKFREE, @FILESIZE, etc.) now support terabytes (trailing t or T) and petabytes (trailing p or P).

 

*Size ranges now support terabytes (trailing t or T) and petabytes (trailing p or P).

 

Date ranges now support ages for the first and/or second parameter.

 

*The Take Command and TCC configuration dialogs now display the name of the active TCMD.INI file in the titlebar. (Hopefully this will reduce some of the "bug" reports when people aren't writing to the TCMD.INI they think they are!)

 

If the cursor is hidden in a console running in  tab window, the tab window cursor will now also be hidden.

 

Added a combo box to the Take Command and TCC configuration dialogs to allow you to select a language dll (default, English, French, or German).

 

HTTP and HTTPS addresses in TCMD and TCC will now have embedded spaces converted to "%20" before sending it to the server.

 

The TCCTABHERE.BTM file will create a "TCC tab window here" prompt in the Folders and List View context menus.

 

You can now mark text in a TCC tab window using the TCC alt-cursor keystrokes and copy/paste the text using the TCMD edit menu and right-click context menu. (Though it's easier & a lot more powerful to use the command window instead!)

 

*Fuzzy directory searching is now 30-50% faster.

 

A trailing & on the command line (with preceding white space) will start the command line in a detached process (like Linux). (This is the same as prefixing "DETACH" to the command, but a little easier to type and more natural for Linux users.)

 

Dropped support for obsolete & unsupported REXX interpreters -- Take Command now only supports ooREXX (Object REXX).

 

 

Startup Options:

 

 

 

.INI Directives:

 

BackgroundImage=filename - BMP file to use as TCMD tab window background.

 

BatchAliases=YES|no - if set to NO, TCC won't try to expand command aliases when in a batch file. (Directory aliases will still be expanded.)

 

CloseIfNoTabs=YES|no - if set to NO, TCMD won't close if there are no tab windows open. (See the Take Command "Advanced" tab.)

 

*CompleteHidden - has been replaced by CompleteHiddenFiles and CompleteHiddenDirs. CompleteHidden will still be recognized if set in TCMD.INI (CompleteHidden=Yes will now be converted to a CompleteHiddenFiles=Yes and a CompleteHiddenDirs=Yes.)  It has been removed from the OPTION dialog.

 

*CompleteHiddenFiles=yes|NO - if set to YES, tab completion will look for hidden files and system files as well as normal files.

 

*CompleteHiddenDirs=yes|NO - if set to YES, tab completion will look for hidden directories as well as normal directories.

 

Python=yes|NO - enable internal Python support.

 

 

Command Line Editing:

 

Ctrl-F (expand aliases) will now also expand any directory aliases on the line. (Useful when passing directory aliases to external apps.)

 

 

New Commands:

 

DISKMONITOR - monitor the free disk space. If it drops below the specified size, DISKMONITOR will execute the specified command.

 

DISKMONITOR [/C] drive size command

 

For example:

 

DISKMONITOR C: 2Gb sendmail [email protected] "Disk Status" Drive C: is full!

 

The drive can also be a sharename. The size format is the same as that used for size ranges (i.e., either a number or a number with an appended k, K, m, M, g, G, t, or T).

 

IDE - start the Take Command IDE / debugger with the specified files loaded into tab windows.

 

SETARRAY - define array variables. You can define up to 4-dimensional arrays. The syntax is:

 

SETARRAY name[a[,b[,c[,d]]]] [...]

 

where a, b, c, and d are the sizes. For example, to define a 5-row by 10-column array:

 

setarray array1[5,10]

 

(The array elements are addressed in base 0, so to reference this array you would use 0-4 for the rows and 0-9 for the columns.)

 

To set the variable elements, use the SET command (see below).

 

If you don't enter any arguments, SETARRAY will display the currently defined arrays. If you don't enter any dimensions, SETARRAY will display the definition for that array. You can use wildcards in the array name.

 

SETERROR - set the %ERRORLEVEL value and the last-error code in Windows to the specified value. The syntax is:

 

     SETERROR n

 

STATUSBAR - write text to the Take Command status bar. The syntax is:

 
STATUSBAR text

 

TASKBAR - call the Windows Taskbar to display dialogs or to manipulate the top level windows. The syntax is:

 

TASKBAR command

 

Where "command" is one of the following:

 

CascadeCascade all top level windows
ComputersDisplay the Find Computers dialog (requires Active Directory Domain Services)
ControlDisplay the Control panel
CustomizeDisplay the Customize Taskbar dialog
DateDisplay the Date and Time dialog
DesktopShow the Windows desktop
HelpDisplay the Help and Support Center dialog
HTileHorizontally tile all top level windows
LockToggle the taskbar lock
MinMinimize all windows
MaxMaximize all windows
PrintersDisplay the Printers and Faxes dialog
PropertiesDisplay the Taskbar Properties dialog
RunDisplay the Run dialog
SearchDisplay the Search dialog
ShutdownDisplay the Shut Down Computer dialog
StartDisplay the Start Menu
TaskDisplay the Windows Task Manager dialog
VTileVertically tile all top level windows

 

UNSETARRAY - remove array variables. The syntax is:

 

UNSETARRAY [/Q] name [...]

 
/Q - quiet (don't display an error for a non-existent array)

 

You can use wildcards in "name".

 

 

Commands:

 

ACTIVATE - added a new option:

 

/FLASH=type,count - flash the specified window. The arguments are:

 

type - type of flash; one or more of the following values:

0 - stop flashing

1 - flash the window caption

2 - flash the taskbar button

4 - flash continuously until WINDOW is called again with the /FLASH type set to 0

12 - flash continuously until the window comes to the foreground (cannot be used with 4)

 

count - the number of times to flash the window

 

ATTRIB - added new options:

 

/N - do not actually change the attributes

 

/NE - no error messages

 

/NJ - no junctions (only useful with /S)

 

/S+n - start 'n' levels down from the source directory.

 

*CD / CDD - fuzzy directory searching is substantially faster (up to 50%).

 

CD / CDD - now allow a forward slash at the beginning of a directory name > 1 character (for unreconstructed Linux users). (In CDD, this may conflict with the multicharacter options; in that case, the options will win out over the directory.)

 

COPY - if you  specify the /C or /U options, COPY will no longer return an error result (2) in %? if no files match.

 

COPY - added new options:

 

/CF - copy the source to the target if the target file exists and is more than 2 seconds older than the source.

 

/UF - copy the source to the target if the target file doesn't exist or is more than 2 seconds older than the source.

 

/S+n - start 'n' levels down from the source directory.

 

/Sx - subdirectory copy to a single target directory (implies /S). For example, to copy all of the .EXE files in "c:\files" and all of its subdirectories to the directory "d:\exefiles":

 

copy /sx c:\files\*.exe d:\exefiles\

 

DATE - added new options:

 

/Fn - where n is the format to use:

 

0 : "Mon  Jan 1, 2009"

1 : " 1/01/09"

2 : "Mon 1/01/2009"

 

/U - display or set the UTC date

 

DEL - added a new option:

 

/S+n - start 'n' levels down from the source directory.

 

*DEL - reformatted the summary to support up to 100 Tb partition sizes.

 

DELAY - added a new option:

 

/F - flush the keyboard buffer after the delay ends

 

DIR - added a new option:

 

/S+n - start 'n' levels down from the specified directory.

 

*DIR - reformatted the summary to support up to 100 Tb partition sizes.

 

*DIRHISTORY /R - is now 500% faster.

 

DIRHISTORY /Tn - display the last n lines of the directory history. If n is negative, skip the first -n lines of the directory history.

 

DO - added new options:

 

DO var in /P command ... - parse the output of a command:

 

/S+n - start 'n' levels down from the source directory.

 

DO - the LEAVE option now accepts an optional parameter to leave nested DO's:

 

LEAVE n -

 

ESET - removed the /W option (a result of the batch debugger changes).

 

FFIND /W - the "Edit" button will now try to open the file with its associated app. If that fails, FFIND will use Notepad.

 

FFIND - added a new option:

 

/S+n - start 'n' levels down from the source directory.

 

FOLDERMONITOR - added a new option:

 

/U - don't set the trigger until the file is unlocked.

 

*FREE - reformatted the output to support up to 100 Tb partition sizes.

 

GLOBAL - added a new option:

 

/S+n - start 'n' levels down from the current directory.

 

IFTP - a /C will now prevent an automatic reconnection if you try something like a "dir ftp:" after the IFTP /C.

 

*HISTORY /R - is now 500% faster.

 

HISTORY -- added new options:

 

/Tn - display the last n lines of the history. If n is negative, skip the first -n lines of the history.

 

/V - display the history in reverse order.

 

INKEY - added support for array variables.

 

INPUT - added a default value for the /E option. The syntax is:

 

/E"value"

 

If the environment variable doesn't exist, INPUT will display the default value for editing.

 

INPUT - added support for array variables.

 

KEYBD - added a new option:

 

/Kn - disable (0) or enable (1) the keyboard. (You can also reenable a disabled keyboard with Ctrl-Alt-End.)

 

LIST - The "E(dit)" option will now first try to edit the file using the editor associated with that filetype (if any). If that fails, LIST falls back to its previous behavior (using the Editor .INI directive if it exists or Notepad.exe if it doesn't).

 

LIST - added a new option:

 

/F - display the contents of the console screen buffer.

 

MOVE - added new options:

 

/CF - move the source to the target if the target file exists and is more than 2 seconds older than the source.

 

/UF - move the source to the target if the target file is more than 2 seconds older than the source.

 

/S+n - start 'n' levels down from the source directory.

 

/Sx - subdirectory move to a single target directory (implies /S). For example, to move all of the .EXE files in "c:\files" and all of its subdirectories to the directory "d:\exefiles":

 

           move /sx c:\files\*.exe d:\exefiles\

 

MSGBOX - added new options:

 

/L - limit the maximum message box width to no more than 1/3 the screen width

 

/V - display the message box in the Vista style (the message background will be the current window color, the buttons will be right-justified and slightly bigger, and the position of icon and message will be adjusted.)

 

MSGBOX now supports Ctrl-C to copy the contents of the message box to the clipboard.

 

*OPTION - removed the popup windows from the Windows tab, as they are now auto-saved whenever the windows are moved or resized.

 

ON - added new options:

 

ON CONDITION test command ... - execute the command if the test is true. The test can be any valid test that is valid in IF.

 

ON RESUME command - execute the command when the system resumes from a suspension (sleep or hibernation).

 

ON SUSPEND command - execute the command when the system is going to sleep or hibernation.

 

*PDIR - added support for quoting filenames (if necessary). The syntax is:

 

pdir /(f[pnq]) - 'q' will cause the name and/or path to be double quoted if it contains white space or special characters.

 

*PDIR - will now suppress empty lines (for example, if you have an @IF conditional in PDIR and not every matching file results in output).

 

PDIR - added a new option:

 

/S+n - start 'n' levels down from the specified directory.

 

PROCESSMONITOR - added the HUNG test.

 

*REN - added some additional checking to REN /N to see if the rename would actually succeed (i.e., checking for things like the target filename already existing).

 

SET - added support for setting array variables. For example, to define a 5-row by 10-column array, you would first use SETARRAY (see above):

 

setarray array1[5,10]

 

To set the array values (0-based), the syntax is:

 

set array1[a[,b[,c[,d]]]

 

For example:

 

set array1[0,0]=Bob

set array1[0,1]=Bob's Job

 

To expand the array variable:

 

echo Name is %array1[0,0] and job is %array1[0,1]

 

SETDOS - the /Y option (which has been deprecated since 7.0) has been removed.

 

*START - changed the /Affinity option to match the new CMD.EXE behavior (in Vista and XP64). It now takes a hex argument for the processor mask -- i.e., to set the affinity for cpu's 1 and 3, set /affinity=5.

 

SYNC - added new options:

 

/S+n - start 'n' levels down from the specified directory.

 

/Y - suppress the prompt if you have the "COPY Prompt on Overwrite" option set.

 

/Z - overwrite read-only files

 

TCTOOLBAR - added new options:

 

/I - reset toolbar to definition in TCMD.INI.

 

/W filename - save the toolbar to the specified file.

 

TIME - added a new option:

 

/U - display or set the UTC time

 

TOUCH - added a new option:

 

/S+n - start 'n' levels down from the specified directory.

 

TYPE - added new options:

 

/X - display the file in hex

 

/XS - display the file in hex, using spaces instead of periods for non-printable characters.

 

WINDOW - added a new option:

 

/FLASH=type,count - flash the TCC or TCMD window. The arguments are:

 

type - type of flash; one or more of the following values:

0 - stop flashing

1 - flash the window caption

2 - flash the taskbar button

4 - flash continuously until WINDOW is called again with the /FLASH type set to 0

12 - flash continuously until the window comes to the foreground (cannot be used with 4)

 

count - the number of times to flash the window

 

 

Internal  Variables:

 

_elevated - (Vista and above) - returns 1 if the TCC process is elevated

 

_ide - returns 1 if in the IDE / debugger

 

_lastdir - previous directory (from directory history)

 

_selected - selected text in the current tab window. (This is normally only useful in toolbar buttons or key aliases, as the selected text will revert to normal on a keystroke.)

 

_tctabs - current number of Take Command tab windows (0 if not in TCMD).

 

_vermajor - TCC major version

 

_verminor - TCC minor version

 

_version - TCC version in "major.minor" format (i.e., "10.0").

 

_xwindow - width of the Take Command or TCC window in pixels

 

_ywindow - height of the Take Command or TCC window in pixels

 

 

Variable Functions:

 

@ARRAYINFO[arrayname,option] - returns information about the specified array.

 

arrayname - name of the array (defined by SETARRAY) to query

option - the type of information:

0 - total number of dimensions

1 - # of elements in the first dimension

2 - # of elements in the second dimension

3 - # of elements in the third dimension

4 - # of elements in the fourth dimension

5 - total number of elements

 

@BALLOC[size] - alloc a buffer for binary operations. The function returns a handle to the buffer (which must be used for the subsequent binary functions). The only limit on the number & size of the binary buffers is the amount of virtual memory available.

 

@BFREE[handle] - free a binary buffer (previously allocated by @BALLOC).

 

@BPEEK[handle,offset,size] - read a value from a binary buffer.

 

handle - a binary handle from @BALLOC

 

offset - the byte offset in the buffer

 

size - the size of the value (in bytes):

1 - character

2 - short

4 - int

8 - int64

 

@BPEEK returns the value read

 

@BPEEKSTR[handle,offset,type,length] - read a string from a binary buffer.

 

handle - a binary handle from @BALLOC

 

offset - the byte offset in the buffer

 

type - the string type:

a - ASCII

u - Unicode

 

length - the maximum number of characters to read

 

@BPEEKSTR returns the string

 

@BPOKE[handle,offset,size,value] - write a value to a binary buffer.

 

handle - a binary handle from @BALLOC

 

offset - the byte offset in the buffer

 

size - the size of the value (in bytes):

1 - character

2 - short

4 - int

8 - int64

 

value - the value to poke

 

@BPOKE returns 0 on success.

 

@BPOKESTR[handle,offset,type,string] - write a string to a binary buffer.

 

handle - a binary handle from @BALLOC

 

offset - the byte offset in the buffer

 

type - the type of the string to write:

a - ASCII

u - Unicode

 

string - the string to poke

 

@BPOKESTR returns 0 on success.

 

@BREAD[handle,offset,filehandle,fileoffset,length] - read from a file to a binary buffer.

 

handle - a binary handle from @BALLOC

 

offset - the byte offset in the buffer

 

filehandle - a file handle opened for reading (from @FILEOPEN)

 

fileoffset - the read offset (from the current file position)

 

length - number of bytes to read

 

@BREAD returns the number of bytes actually read.

 

@BWRITE[handle,offset,filehandle,fileoffset,length] - write from a binary buffer to a file

 

handle - a binary handle from @BALLOC

 

offset - the byte offset in the buffer

 

filehandle - a file handle opened for writing (from @FILEOPEN)

 

fileoffset - the write offset (from the current file position)

 

length - the number of bytes to write

 

@BWRITE returns the number of bytes written

 

@EVAL - added support for array names w/o a leading %.

 

@EVAL - added new operators and functions:

 

!a - return the inverse not (i.e., !0 = 1, !5 = 0)

a>b - return 1 if a is greater than b

a<b - return 1 if a is less than b

fact(a) - return the factorial

ceil(a) - return the ceiling

floor(a) - return the floor

abs(a) - return the absolute value

gcd(a b) - return the greatest common divisor

lcm(a b) - return the least common multiple

 

ror(value shift precision) - rotate right

rol(value shift precision) - rotate left

value - integer value to rotate

shift - the number of bits to shift

precision - the size of "value" in bits

 

For example, to rotate the 32-bit integer "123" 2 bits to the right:

 

%@eval[ror(123 2 32)]

 

@EXECARRAY[array,command] - execute the specified command and store the resulting lines in the specified array. (You must define the array before running @EXECARRAY.)  For example:

 

setarray aresult[10]

echo %@execarray[aresult,dir /u] >& nul

 

@EXECARRAY will read the number of lines specified in the array size definition.

 

@EXECSTR - added new option for the line to return. The syntax is:

 

@EXECSTR[[n,]command]

 

where "n" is the line you want (base 0). For example, to return the third line returned by VER /R:

 

echo %@execstr[2,command]

 

@FILEARRAY[array,filename] - read a file and store the lines in the array. (You must define the array before running @FILEARRAY.)  For example:

 

setarray aresult[10]

echo %@filearray[aresult,test.dat]

 

@FILEARRAY will return the number of lines read. @FILEARRAY will not read more than the number of lines specified in the array size definition.

 

@FILEHANDLE[handle] - returns the filename for the specified file handle (opened with @FILEOPEN).

 

@FILES - added /S+n option to start 'n' levels down from the specified directory.

 

@FILESIZE - added /S+n option to start 'n' levels down from the specified directory.

 

@FILTER[chars,string] - removes any characters in "string" that aren't in "chars". For example, to remove all non-numeric characters from a variable:

 

%@filter[0123456789,%var]

 

@FOLDERS[directory] - returns number of matching folders.

 

@ISFLOAT[string] - returns 1 if the string is composed only of numeric characters, a decimal separator, and an optional sign and/or thousands separator(s).

 

@ISLOWER[string] - returns 1 if the string is composed only of lower case letters.

 

@ISUPPER[string] - returns 1 if the string is composed only of upper case letters.

 

*@LINE - is now 700% faster.

 

*@LINES - is now 700% faster.

 

@MX[address] - return the email server for the specified user address.

 

@PID[filename] - returns the PID for specified name (or 0 if no match). If you have multiple copies of the same executable running, @PID will return the first one it finds.

 

@PYTHON[command] - execute the Python string. The Python interpreter is persistent; if you want to reset it pass an empty string to @PYTHON.

 

@REGCOPYKEY[source,target] - copy a registry key.

 

@REGCREATE, @REGDELKEY, @REGEXIST, @REGQUERY, @REGSET, @REGSETENV, and @REGTYPE - added an option to access the 64-bit registry in Win64. If you append "_64" to the HKEY name, TCC will access the 64-bit registry instead of the 32-bit registry. For example:

 

@regcreate["HKLM_64\Software\Company\Product\User"]

 

@SERVICE[service,info] : Returns information about the specified service.

 

service - the service name to query

info - the information you want:

1The type of service
2The current state of the service
3The control codes the service accepts and processes in its handler function.
4Returns the check-point value the service increments to report its progress during a lengthy start, stop, pause, or continue operation.
5Returns the estimated time required for a pending start, stop, pause, or continue operation (in milliseconds).

 

@SNAPSHOT - added support for multiple monitors when using the DESKTOP argument.

 

@WINCLIENTSIZE[title] - returns the client window size in the format:

 

height,width

 

@WINPID[title] - returns the process ID for the window.

 

@WINSIZE[title] - returns the window size in the format:

 

height,width

 

 

Batch Debugger:

 

The IDE / batch debugger is all new, and includes multiple tabbed editing windows and tabbed / dockable watch & variable windows.

 

The IDE now supports themes (Options / Theme).

 

In addition to batch files (.BTM, .BAT, and .CMD) the syntax coloring in the editor also supports editing C++, INI, Javascript, LUA, Pascal, Python, SQL, VBScript, and XML files.

 

The IDE maintains a list of the recently edited files.

 

There are new options in the File menu (Save All, Close All, Print Preview).

 

There are a number of new options in the Edit / Advanced menu (tabify / untabify, make selection uppercase / lowercase, collapse / expand, and view whitespace).

 

The "Pause" button / menu entry pauses debugging at the completion of the current command line.
 

The watch window now also supports internal variables, variable functions, and user-defined functions.

 

The IDE status bar is customizable (right click).