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
| Argument | Type | Default | Description |
|---|---|---|---|
| NAME | path | required | The 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
- Tcl 8.6.16 and 9.0.4 give an empty string for
file rootname .hidden, and ztcl gives.hidden(issue 682).
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