Show/Hide Toolbars

Take Command / TCC Help v. 21

Navigation: TCC > Variables & Functions > Functions

Variable Functions Listed by Category

Scroll Prev Top Next More

See also Functions by Name.

 

This list gives a one-line description of all built-in Variable Functions, and a cross reference which selects a separate help topic on that function where you will find the detailed syntax and description. You can also obtain help on any function with a HELP @functionname  command at the prompt or by pressing Ctrl-F1 when the cursor is on the function name. See the HELP command for details

 

 

Note: many functions have functionality that covers several categories.

 

System status

 

@ASSOC

File association for the extension

@CLIP

Specified line from clipboard

@CLIPW

Write string to the clipboard

@CONSOLE

Identify console sessions

@CONSOLEB

Create or restore console screen buffers

@ERRTEXT

Windows error description

@FTYPE

Open command string for the file type

@ISPROC

Returns 1 if a process is active; otherwise 0

@PID

Process ID for the process name

@PIDCOMMAND

Startup command line for a process

@PIDUSER

User name for a PID

@PPID

Process ID of the parent of the specified process

@PRIORITY

Priority class for a process

@PROCESSIO

Process I/O information

@PROCESSTIME

Process times (start, end, kernel mode, user mode)

@READSCR

Read characters from the screen

@REGBREAD

Read registry value into a binary buffer

@REGBWRITE

Write registry value from a binary buffer

@REGCOPYKEY

Recursively copy a registry key to a new location

@REGCREATE

Create registry subkey

@REGDELKEY

Delete a registry key and its subkeys

@REGEXIST

Test if a registry key exists

@REGQUERY

Read value from registry

@REGSET

Write value to registry

@REGSETENV

Write value to registry and broadcast change.

@REGTYPE

Type of registry variable

@SERIALPORTCLOSE

Close the serial port

@SERIALPORTFLUSH

Flush the serial port buffer

@SERIALPORTOPEN

Open a serial port

@SERIALPORTREAD

Read the serial port buffer

@SERIALPORTWRITE

Write a string to the serial port buffer

@SYSTEMTIME

System times (idle, kernel, and user)

@WINCLASS

Title of first window with classname

@WINCLIENTSIZE

Client window size

@WINEXENAME

Executable name for window

@WININFO

Current system information

@WINMEMORY

Windows memory information

@WINMETRICS

Windows system metrics

@WINPID

Process ID for window

@WINPOS

Window position

@WINSIZE

Window size

@WINSTATE

Current state of window

@WINSYSTEM

Set/get windows system parameters

@WINTITLE

Window title of PID

 

Directories, drives and devices

 

@CDROM

CD-ROM drive: 1, otherwise 0

@CWD

Current Working Directory of specified drive

@CWDS

Current Working Directory of specified drive, with trailing backslash

@DEVICE

Character device: 1, otherwise 0

@DISKFREE

Free disk space

@DISKTOTAL

Total disk space

@DISKUSED

Used disk space

@DRIVETYPE

Type of drive (hard drive, CD-ROM, etc.)

@DRIVETYPEEX

Type of drive (hard drive, CD-ROM, etc.)

@FSTYPE

File system type (FAT, NTFS, CDFS, etc.)

@JUNCTION

Directory referenced by the junction

@LABEL

Volume label

@READY

Drive ready: 1, otherwise 0

@REMOTE

Remote (network) drive: 1, otherwise 0

@REMOVABLE

Removable drive: 1, otherwise 0

@SERIAL

Serial number of a disk

@SHFOLDER

Windows folder locations

@SYMLINK

Target of a symbolic link

@USB

Drive is USB : 1, else 0

 

File content

 

@B64DECODE

Decode a Base64 file or string

@B64ENCODE

Encode a file or string as Base64

@CKSUM

Linux cksum-compatible CRC32

@COMPARE

Compare two files

@CRC32

File CRC

@FILEARRAY

Read a file into an array

@FILECLOSE

Close a file handle

@FILEOPEN

Open a file handle

@FILEREAD

Read next line from a file

@FILEREADB

Read bytes from a file

@FILESEEK

Move a file handle pointer

@FILESEEKL

Move a file handle pointer to a specified line

@FILEWRITE

Write next line to a file

@FILEWRITEB

Write data to a file handle

@HEXDECODE

Decode a hexadecimal file or string

@HEXENCODE

Encode a file or string as hexadecimal

@INIREAD

Return an entry from an .INI file

@INIWRITE

Write an entry in an .INI file

@INODE

Inode value for a file

@LINE

Specified line from a file

@LINES

Count lines in a file

@LINKS

Number of NTFS hard links for a file

@MD5

MD5 hash of a string or file

@SHA1

SHA1 checksum for a file

@SHA256

SHA2-256 checksum for a file

@SHA384

SHA2-384 checksum for a file

@SHA512

SHA2-512 checksum for a file

@SUMMARY

NTFS SummaryInformation stream for a file

@TRUNCATE

Truncate file at current position

@UTF8DECODE

Decode a UTF8 file or string

@UTF8ENCODE

Encode a file or string as UTF8

@UUDECODE

Decode a UU Encoded file

@UUENCODE

Encode a file as UU Encoded

@VERINFO

Executable file version information

@YDECODE

Decode a Y Encoded file or string

@YENCODE

Encode a file or string as Y Encoded

 

File names

 

@ALTNAME

Short name for the file.

@EXPAND

All names that match filename

@EXT

File extension

@FILEHANDLE

Filename for a handle

@FILENAME

File name and extension

@FULL

Full file name with path

@LFN

Long name for a short filename

@NAME

File name without path or extension

@PATH

File path without name

@QUOTE

Double quote a filename

@SFN

Short name for a long filename

@SEARCH

Path search

@TRUENAME

True name of a file

@UNC

UNC name of a file

@UNIQUE

Create file with unique name

@UNQUOTE

Remove double quotes from a filename

@UNQUOTES

Remove leading and trailing double quotes

@VERSION

Returns a versioned filename

 

File properties

 

@ATTRIB

Test or return file attributes

@DESCRIPT

File description

@EVERYTHING

Call Everything Search

@EXETYPE

Application type

@FILEAGE

File age (date and time)

@FILEDATE

File date

@FILELOCK

Return PIDs with a lock on the file

@FILES

Number of files matching a wildcard

@FILESIZE

Total size of files matching a wildcard

@FILETIME

File time

@FINDCLOSE

Closes the search handle.

@FINDFIRST

Find first matching file

@FINDNEXT

Find next matching file

@INODE

Inode value for a file

@LINKS

Number of NTFS hard links for a file

@OWNER

File owner

@SEARCH

Path search

@SUMMARY

NTFS SummaryInformation stream for a file

@TRUENAME

True name for a file

@UNIQUE

Create file with unique name

@VERINFO

Executable file version information

@WATTRIB

Test or return file attributes

 

Strings and characters

 

@ASCII

List of ASCII-s for characters in string

@CAPS

Capitalize first character of each word

@CHAR

Character string, given a set of ASCII-s

@COUNT

Counts occurrences of a character in a string

@EMAIL

Validate an email address

@EXECARRAY

Execute a command and store the results in an array variable

@EXECSTR

Execute a command and return the output line

@FIELD

Extract a field from a string

@FIELDS

Count fields in a string

@FILTER

Removes non-matching characters from a string

@FORMAT

Formats data string according to format string

@HTMLDECODE

Decode an HTML string

@HTMLENCODE

Encode a string for HTML

@INDEX

Offset of string2 within string1

@INSERT

Insert string1 into string2

@INSTR

Extract a substring

@ISALNUM

Test for alphanumeric characters

@ISALPHA

Test for alphabetic characters

@ISASCII

Test for ASCII characters

@ISCNTRL

Test for control characters

@ISDIGIT

Test for decimal digits

@ISFLOAT

Returns 1 if the string is a floating point number

@ISLOWER

Returns 1 if the string is all lower case

@ISPRINT

Test for printable characters

@ISPUNCT

Test for punctuation characters

@ISSPACE

Test for white space characters

@ISUPPER

Returns 1 if the string is all upper case

@ISXDIGIT

Test for hexadecimal digits

@LCS

Longest common sequence in two strings

@LEFT

Left end of string

@LEN

Length of a string

@LOWER

Convert string to lower case

@LTRIM

Trims specified leading characters.

@MD5

MD5 hash of a string or file

@MX

Email server for a user address

@PARSE

Parse the command line for switches

@QUOTE

Double quote a string

@REGEX

Return a Regular Expression test

@REGEXINDEX

Return the offset of a regular expression match

@REGEXSUB

Return the nth matching group of a regular expression test

@REPEAT

Repeat a character

@REPLACE

Replace string1 with string2 in text

@REREPLACE

Regular expression back reference substitution

@REVERSE

Reverse a string

@RIGHT

Right end of string

@RTRIM

Trims specified trailing characters.

@SIMILAR

Test similarity between two strings

@STRIP

Strips all characters in char from string

@SUBST

Substitute a string within another string

@SUBSTR

Older version of @INSTR to extract a substring

@TALNUM

Number of alphanumeric characters in a string

@TALPHA

Number of alphabetic characters in a string

@TASCII

Number of 7-bit ASCII characters in a string

@TCNTRL

Number of ASCII control characters in a string

@TDIGIT

Number of digits (0-9) in a string

@TLOWER

Number of lower case characters in a string

@TPRINT

Number of printable characters in a string

@TPUNCT

Number of punctuation characters in a string

@TRIM

Remove leading and trailing blanks from a string

@TRIMALL

Removing leading, trailing, and extra internal blanks from a string

@TSPACE

Number of white space characters in a string

@TUPPER

Number of upper case characters in a string

@TXDIGIT

Number of hexadecimal digits in a string

@UNICODE

List of UNICODEs for characters in string

@UNQUOTE

Remove double quotes from a string

@UNQUOTES

Remove leading and trailing double quotes

@UPPER

Convert string to upper case

@URLDECODE

Decode an URL string

@URLENCODE

Encode an URL string

@WILD

Compares strings using wildcards

@WORD

Extract a word from a string

@WORDS

Count words in a string

 

Binary buffers and shared memory

 

@BALLOC

Allocate a binary buffer

@BFREE

Free a binary buffer

@BPEEK

Read a value from a binary buffer

@BPEEKSTR

Read a string from a binary buffer

@BPOKE

Write a value to a binary buffer

@BPOKESTR

Write a string to a binary buffer

@BREAD

Read from a file to a binary buffer

@BWRITE

Write from a binary buffer to a file

@SMCLOSE

Close a handle to shared memory

@SMOPEN

Open a handle to shared memory

@SMPEEK

Read a value from shared memory

@SMPOKE

Write a value to shared memory

@SMREAD

Read a string from shared memory

@SMWRITE

Write a string to shared memory

 

Numbers and arithmetic

 

@ABS

Absolute value of n

@AVERAGE

Average of a list

@CEILING

Smallest integer not less than n

@COMMA

Insert commas (thousands separators) into a numeric string

@CONVERT

Convert value from input base to output base

@DEC

Decrement a numeric value by 1

@DECIMAL

Decimal fraction portion of a number

@DIGITS

Tests if string is all digits

@EVAL

Arithmetic calculations

@FORMATN

Format a numeric value

@FORMATNC

Format a numeric value and insert thousands separators

@FLOOR

Largest integer not larger than n

@INC

Increment a numeric value by 1

@INT

Integer part of a number

@ISPRIME

Test if a number is a prime

@MAX

Largest integer in the list

@MIN

Smallest integer in the list

@NUMERIC

Test if a string is numeric

@PRIME

Generate a prime number

@RANDOM

Generate a random integer

 

Dates and times

 

@AGEDATE

Converts an age into date and time

@DAY

Day of month for date

@DATE

Convert date to number of days

@DATECONV

Convert date formats

@DOW

Short name of day of week for date

@DOWF

Full name of day of week

@DOWI

Day of week as integer

@DOY

Day of year for date

@GETDATE

Select a date from a calendar

@GETDATETIME

Select a date and/or time from a date picker

@IDOW

Short localized name of day of week for date

@IDOWF

Full localized name of day of week for date

@ISODOWI

ISO 8601 numeric day of week

@ISOWEEK

ISO 8601 numeric week of year

@ISOWYEAR

ISO 8601 numeric week date year

@MAKEAGE

Convert date and time to age

@MAKEDATE

Convert number of days to date

@MAKETIME

Convert number of seconds to time

@MONTH

Month in specified date

@TIME

Convert time to number of seconds

@YEAR

Year for date

 

Input dialog boxes

 

@GETDIR

Prompt for a directory name.

@GETFILE

Prompt for a path and file name.

@GETFOLDER

Folder name from tree view.

@SELECT

Menu selection

 

Network properties

 

@AFSCELL

OpenAFS cell name for a path

@AFSMOUNT

OpenAFS mount point for a path

@AFSPATH

Path is in OpenAFS: 1, otherwise 0

@AFSSYMLINK

OpenAFS symbolic link for a path

@AFSVOLID

OpenAFS volume ID for a path

@AFSVOLNAME

OpenAFS volume name for a path

@BTDEVICEADDRESS

The Bluetooth address of the device

@BTDEVICEAUTHENTICATED

Returns 1 if the Bluetooth device is authenticated

@BTDEVICECLASS

The device class for the Bluetooth device

@BTDEVICECONNECTED

Returns 1 if the Bluetooth device is connected

@BTDEVICELASTSEEN

The last time the Bluetooth device was seen

@BTDEVICELASTUSED

The last time the Bluetooth device was used

@BTDEVICENAME

The name of the Bluetooth device

@BTDEVICEREMEMBERED

Returns 1 if the Bluetooth radio is remembered

@BTRADIOADDRESS

The Bluetooth address of the radio

@BTRADIOCLASS

The device class of the Bluetooth radio

@BTRADIOCONNECTABLE

Returns 1 if the Bluetooth radio accepts connections

@BTRADIODISCOVERABLE

Returns 1 if the Bluetooth radio is discoverable

@BTRADIOMANUFACTURER

The manufacturer of the Bluetooth radio

@BTRADIONAME

The name of the Bluetooth radio

@BTRADIOSUBVERSION

The radio subversion of the Bluetooth radio

@BTSERVICEADDRESS

The Bluetooth address of the service

@BTSERVICECLASSID

The service class ID (UUID) of the Bluetooth service

@BTSERVICECOMMENT

A comment describing the Bluetooth service

@BTSERVICENAME

The name of the Bluetooth service

@BTSERVICEOTHERCLASSID

A list of other class IDs for the Bluetooth service

@BTSERVICEPORT

The port on which the Bluetooth service is running

@BTSERVICEPROTOCOL

The protocol used by the Bluetooth service

@DOMAIN

Domain name of a computer

@ENUMSERVERS

Identify server names on a network

@ENUMSHARES

Identify sharenames on a server

@GROUP

User is member of group: 1, otherwise 0

@IPADDRESS

The numeric IP for a host name

@IPADDRESSN

IP address of an adapter

@IPALIASES

Aliases of a host

@IPDESC

Description of an adapter

@IPDHCP

DHCP server of an adapter

@IPGATEWAY

Gateway of an an adapter

@IPIPV6N

IPv6 address of an adapter

@IPNAME

The host name for a numeric IP

@IPNAMEN

Name of an adapter

@IPPHYSICAL

Physical address of an adapter

@IPPORT

Port number for a service

@IPSERVICEALIASES

Aliases for a service

@IPSUBNET

Subnet mask of an adapter

@IPTYPE

Type of an adapter

@IPWINS

Returns 1 if an adapter is using WINS

@IPWINSSERVER

Primary WINS server for an adapter

@IPZONEID

IPv6 Zone ID of an adapter

@MACADDRESS

MAC address of network interface

@PING

Response time from a host

@SERVER

Query server information

@WORKGROUP

Workgroup name of a computer

 

Utility

 

@ALIAS

Value of an alias

@ARRAYINFO

Array variable information

@CAPI

Call a _cdecl function in a DLL

@CLIP

Specified line from clipboard

@CLIPW

Write string to the clipboard

@COLOR

RGB value of a color

@DEBUG

Write a string to the debugger

@DIRSTACK

Display directory stack entry

@ERRTEXT

Windows error description

@EXEC

Execute a command, returns its exit code

@EXECSTR

Execute a command, returns its first output line

@FONT

Console font information

@FUNCTION

Definition of a function

@HISTORY

A line or word from the command history

@IF

Value dependent on a conditional expression

@LUA

Execute a Lua expression

@OPTION

Current configuration option value

@PERL

Evaluate a Perl expression

@PLUGIN

Full pathname for plugin

@PLUGINVER

Plugin version number

@READSCR

Read characters from the screen

@REXX

Evaluate a REXX expression

@RUBY

Evaluate a Ruby expression

@SCRIPT

Evaluate expression in active scripting engine

@SELECT

Menu selection from file

@SELECTARRAY

Menu selection from array variable

@SERVICE

Query service information

@SNAPSHOT

Save a window or the desktop to a BMP

@TCL

Execute a Tcl/tk command

@TIMER

Get split time from timer.

@TK

Execute a Tk script or expression

@UUID

Create a UUID / GUID

@WINAPI

Call a Windows API function

@WMI

Query WMI

@XMLCLOSE

Close an XML file previously opened by @XMLOPEN

@XMLNODES

Return the number of nodes (children) for the specified path in an XML file

@XMLOPEN

Open an XML file for use by @XMLXPATH and/or @XMLNODES

@XMLXPATH

Return text of XML element

 

Compression and Decompression

 

@TARCOUNT

The number of files in a .tar archive

@TARCFILE

The compressed name of a file in a .tar archive

@TARDFILE

The decompressed name of a file in a .tar archive

@TARFILEDATE

The date and time of a file in a .tar archive

@TARFILESIZE

The (uncompressed) size of a file in a .tar archive

@ZIPCOUNT

The number of files in a .zip archive

@ZIPCOMMENT

The comment text for a .zip archive

@ZIPCFILE

The compressed name of a file in a .zip archive

@ZIPDFILE

The decompressed name of a file in a .zip archive

@ZIPFILECOMMENT

The comment (description)  of a file in a .zip archive

@ZIPFILECRC

The CRC of a file in a .zip archive

@ZIPFILEDATE

The date and time of a file in a .zip archive

@ZIPCFILESIZE

The compressed size of a file in a .zip archive

@ZIPDFILESIZE

The decompressed size of a file in a .zip archive