Group Listing of Commands

This section briefly lists all Tcl commands, grouped logically by function.

Control Statements


Abort innermost containing loop command.


Obsolete, see switch.


Skip to next iteration of innermost containing loop command.


Terminate process.


Loop based on an expression.


Loop over each element of a list.


Conditional evaluation.


Return from procedure.


Evaluation based on pattern match.


Loop based on a condition being true.

File Manipulation

file atime

Return file access time.

file mtime

Return file modification time.

file attributes

Set or get platform-dependent file attributes.

file copy

Make copy of a file or directory.

file delete

Remove file or directory.

file dirname

Return directory portion of pathname.

file executable

Return 1 if file is executable, 0 otherwise.

file exists

Return 1 if file exists, 0 otherwise.

file isdirectory

Return 1 if file is a directory, 0 otherwise.

file isfile

Return 1 if file is a regular file, 0 otherwise.

file owned

Return 1 if file is owned by current user, 0 otherwise.

file readable

Return 1 if file is readable by current user, 0 otherwise.

file writable

Return 1 if file is writable by current user, 0 otherwise.

file extension

Return characters after and including last period.

file join

Combine arguments with path separator to form pathname.

file mkdir

Create a directory.

file nativename

Return platfor m-specific filename.

file pathtype

Return type of path: absolute, relative, or volumerelative.

file readlink

Return value ...

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.