file rootname

Gives a path with no extension.

file rootname NAME

Description

Gives NAME with the extension of file extension removed. A name with no extension stays as it is.

Arguments

ArgumentTypeDefaultDescription
NAMEpathrequiredThe path.

Returns

The path with no extension.

Examples

% file rootname notes.tar.gz
notes.tar

% file rootname a.b/c
a.b/c

Errors

% file rootname
wrong # args: should be "file rootname name"
-errorcode TCL WRONGARGS

Differences from Tcl

Facts

Capability
file. A new interpreter does not have it until the host turns it on.
Tcl release
Tcl 9.1 and 8.6.
Since
ztcl 1.0.0-beta.1

See also