Skip to main content

Take Command v15 Public Beta, Part 3

Today I’ll cover the updated internal commands in Take Command 15.0. (You can see the full feature list for v15 in the What’s New in Version 15 section of the online help.)

Updated Commands:

CD

If the TCMD.INI directive “EverythingSearch” is set, CD will use “Everything Search” (http://www.voidtools.com) instead of JPSTREE.IDX for fuzzy directory searches. Everything Search is slightly faster, but will only work on local NTFS drives. Setting EverythingSearch is the equivalent of setting FuzzyCD=3 (*name*), unless you’re using regular expressions.

CDD

If the TCMD.INI directive “EverythingSearch” is set, CDD will use “Everything Search” (http://www.voidtools.com) instead of JPSTREE.IDX for fuzzy directory searches. Everything Search is slightly faster, but will only work on local NTFS drives. Setting EverythingSearch is the equivalent of setting FuzzyCD=3 (*name*), unless you’re using regular expressions.

COPY

If you specify the /C, /CF, /R, /U, or /UF options, COPY will append a ! to the copy specifier if the target exists and is being overwritten. For example:

[d:\] copy file1 file2
file1 =>! file2

If the EverythingSearch option is set, COPY won’t try to update JPSTREE.IDX for local NTFS drives.

The /N option no longer creates empty subdirectories when used with /S.

DEL

If the EverythingSearch option is set, DEL won’t try to update JPSTREE.IDX for local NTFS drives.

FREE

Now supports the OpenAFS 1.7.x redirector to retrieve disk space usage.

IF

If the “DupBugs” TCMD.INI directive (OPTION / Startup / “Duplicate CMD.EXE bugs”) has been set, the IF behavior is different when in a command group in a batch file. If there are multiple command lines in the command group, a failed IF will now only ignore the remainder of the commands on that line. The commands on the subsequent lines will still be executed.

IFTP

/EP – Use Extended Passive mode. (Works with FTP and FTPS, but not SFTP.)

/IPv6 – By default, IFTP expects an IPv4 address for the local and remote host, and will create an IPv4 socket. The /IPv6 option tells IFTP to use IPv6 instead. (Works with FTP, FTPS, and SFTP connections.)

/PR=”nnn” – When using active mode, IFTP uses any available port to listen to incoming connections from the server. You can override this behavior by setting /PR (PortRange) to a value containing the range of ports the class will be listening to. The range is provided as start-end, for instance: “1024-” stands for anything higher than 1024, “1024-2048” stands for ports between 1024 and 2048 inclusive, “4000-4010, 50000-50010” stands for ports between 4000 and 4010 or between 50000 and 50010. (Works with FTP and FTPS, but not SFTP.)

/Z[n] – Use Zlib compression. You can optionally set the compression level (0-9; the default is 7). Zlib compression must be enabled on the server, and will only work with FTP and FTPS connections (not SFTP).

JABBER

/F”filename” – Send a file to the specified target.

MD

If the EverythingSearch option is set, MD won’t try to update JPSTREE.IDX.

MOVE

If you specify the /C, /CF, /R, /U, or /UF options, MOVE will append a ! to the move specifier if the target exists and is being overwritten. For example:

[d:\] move file1 file2
file1 ->! file2

/G – Will now display the % moved even if Windows is doing a rename (which may be a copy & delete internally).

If the EverythingSearch option is set, MOVE won’t try to update JPSTREE.IDX for local NTFS drives.

OPTION

OPTION now allows you to set “Auto SSL” for SMTP (i.e., SENDMAIL and SENDHTML).

OSD

OSD now lets you control up to 10 simultaneous OSD displays. (OSD allows you to create any number of windows, but you can only close the ones you’ve labeled from 0-9.) There are two new switches:

/C=n – Close the OSD window n (0-9). /C=n must be the only argument to OSD.

/ID=n – Open the OSD window n (0-9). /ID must be the first argument to OSD.

If you don’t specify an /ID, OSD will default to window 0.

PLUGIN

PLUGIN now accepts multiple plugin name arguments. (The new syntax should still support commands using the old syntax.) The syntax is:

PLUGIN [/B /C /F /I /K /L /P /U /V] plugin …

PRINT

PRINT now accepts piped & redirected input to send to the printer. If there is no filename, PRINT will read from STDIN, create a temporary file, and send it to the printer.

PROMPT

~ – New metacharacter (substitute for P). If the environment variable HOME (or HOMEDRIVE + HOMEPATH) exists, TCC will compare the variable to the beginning of the current path. If they match, TCC will substitute ~ for the variable part. (If they don’t match, ~ is treated like a P.)

For example:

[c:\] set home=c:\users\myself
[c:\] set prompt=[$~] [c:\] cd \users\myself\downloads
[~\downloads]

RD

If the EverythingSearch option is set, RD won’t try to update JPSTREE.IDX for local NTFS drives.

REN

If the EverythingSearch option is set, REN won’t try to update JPSTREE.IDX for local NTFS drives.

SENDHTML

/= (Command dialog) – Added the BCC: option.

/SMTP=server – Overrides the default SMTP server to use to send mail.

/USER=address – Overrides the default email account to use to send mail.

The OPTION command now allows you to set “Auto SSL” for SENDHTML.

SENDMAIL

/= (Command dialog) – Added the BCC: option.

/SMTP=server – Overrides the default SMTP server to use to send mail.

/USER=address – Overrides the default email account to use to send mail.

The OPTION command now allows you to set “Auto SSL” for SENDMAIL.

SYNC

If the EverythingSearch option is set, SYNC won’t try to update JPSTREE.IDX for local NTFS drives.

TAR

/TEST – Test the integrity of the TAR file (header and contents). Any errors will be displayed on STDERR.

TPIPE

TPIPE is using a new version of the text pipe engine. There will be a number of additional TPIPE options in v15.

Grep filters now allow Unicode patterns (when UTF-8 support mode is enabled).

Split filter now allows Unicode filenames, and Unicode file break patterns.

Removed the (completely useless) Quick Help from TPIPE. A “TPIPE /?” now invokes the online help for TPIPE.

/BUFFERSIZE – Sets the buffer size for the preceding search/replace filter. (The default is 4096.)

/buffersize=n

/EDITDISTANCE – Sets the edit distance threshhold for the preceding search/replace filter. (The default is 2.)

/editdistance=n

/DATABASE – Adds a database-type filter.

/database=Mode,GenerateHeader,Timeout,Connection,InsertTable,FieldDelimiter,Qualifier

Mode
0 Delimited output
1 Fixed width
2 XML
3 Insert script

GenerateHeader – Generates header information when True.

Timeout – SQL command timeout in seconds.

ConnectionStr – The database connection string.

InsertTable – The name of the insert table.

FieldDelimiter – The string to use between columns.

Qualifier – The string to use around string column values.

/SELECTION – Added additional options for restriction filter types. (Restriction filters require sub filters to have any effect.)

/selection=Type,Locate,Param1,Param2,MoveTo,nDelimiter,CustomDelimiter,HasHeader[,ProcessIndividually] The new Type options are:

1 Restrict lines
2 Restrict columns
3 Restrict to bytes
4 Restrict to delimited fields (CSV, Tab, Pipe etc.)

The new ProcessIndividually option specifies whether to apply sub filters to each CSV or Tab field individually (1), or to the fields as one string value (0). The default is false.

/MATHS – Adds a maths type filter. The syntax is:

/maths=operation,operand

operation – the operation to perform
0 +
1 –
2 *
3 div (the remainder is ignored)
4 mod (the remainder after division)
5 xor
6 and
7 or
8 not
9 shift left (0 inserted)
10 shift right (0 inserted)
11 rotate left
12 rotate right

operand – the operand to use

/PERL – Sets the Perl matching options for the immediately preceding search/replace filter.

/perl=BufferSize,Greedy,AllowComments,DotMatchesNewLines

BufferSize – The maximum buffer size to use for matches. Any match must fit into this buffer, so if you want to match larger pieces of text, increase the size of this buffer to suit. Default is 4096.
Greedy – If the pattern finds the longest match (greedy) or the shortest match. Default is false.
AllowComments – Allow comments in the Perl pattern. Default is false.
DotMatchesNewLines – Allow the ‘.’ operator to match all characters, including new lines. Default is true.

/REPLACELIST – Add a search and replace list, using search and replace pairs from the specified file.
/replacelist=Type,MatchCase,WholeWord,CaseReplace,PromptOnReplace,FirstOnly,SkipPromptIdentical,Simultaneous,LongestFirst,Filename
Type:

0 Replace
1 Pattern (old style)
2 Sounds like
3 Edit distance
4 Perl pattern
5 Brief pattern
6 Word pattern

MatchCase – Matches case when set to 1, ignores case when set to 0

WholeWord – Matches whole words only when set to 1

CaseReplace – Replaces with matching case when set to 1

PromptOnReplace – Prompts before replacing when set to 1

FirstOnly – If 1, only replace the first occurrence

SkipPromptIdentical – If 1, don’t bother prompting if the replacement text is identical to the original.

Simultaneous – If 1, all search strings are scanned for simultaneously instead of consecutively. (This is useful if the search strings and results strings overlap.)

LongestFirst – If 1, searches for long phrases (most specific) before short phrases (least specific) – this is generally used for translations.

Filename – The file to load search/replace pairs from. If the file extension is .XLS or .XLSX, the file is assumed to be Excel format, if the extension is .TAB the file is assumed to have tab-delimited values, and any other extension (including .CSV) is assumed to have Comma-Separated Values.

The filename can contain environment variables enclosed in % signs e.g. %TEMP%\myfile.txt. TPIPE corrects any doubled backslashes.

/SCRIPT – Adds an ActiveX script filter. The syntax is:

/script=language,timeout,code

language: The language of the script
timeout: The command timeout in seconds
script: The code

/STARTSUBFILTERS – The following filters are created as sub filters, until the closing /ENDSUBFILTERS. Sub filters allow a restricted part of the entire text to be operated on by a group of filters without effecting the entire text. For example, a “Restrict to delimited fields” (CSV, Tab, Pipe, etc.) filter can pick out a range of CSV fields, and then a search/replace filter can operate JUST on the text restricted.

/ENDSUBFILTERS – End the sub filters defined by the preceding /STARTSUBFILTERS.

UNTAR

/TEST – Test the integrity of the TAR file (header and contents). Any errors will be displayed on STDERR.

UNZIP

/TEST – Test the integrity of the ZIP file (header and contents). Any errors will be displayed on STDERR.

VIEW

VIEW now has the ability to view CSV files as tables. CSV files are typically used to represent tabular data, where each line in the file represents a row of a table. Each line contains the text of each column in the row, separated by a comma (although other characters can be used – eg, a TAB).

By default, VIEW will automatically recognize CSV files and will display them as a table – where all the columns have the same width (much like a spreadsheet). Although unlike a spreadsheet, the column widths in V are fixed (determined by the longest entry in the column) and cannot be resized. You can press the arrow button next to the new CSV Mode button in the toolbar to customize the CSV behavior. Press the CSV Mode button to toggle between CSV mode and standard text mode.

ZIP

/TEST – Test the integrity of the ZIP file (header and contents). Any errors will be displayed on STDERR.