Table 9-2. The file command options.
| file atime name | Returns access time as a decimal string. |
| file attributes name ?option? ?value? ... | Queries or sets file attributes. (Tcl 8.0) |
| file copy ?-force? source destination | Copies file source to file destination. The source and destination can be directories. (Tcl 7.6) |
| file delete ?-force? name | Deletes the named file. (Tcl 7.6) |
| file dirname name | Returns parent directory of file name. |
| file executable name | Returns 1 if name has execute permission, else 0. |
| file exists name | Returns 1 if name exists, else 0. |
| file extension name | Returns the part of name from the last dot (i.e., .) to the end. The dot is included in the return value. |
| file isdirectory name | Returns 1 if name is a directory, else 0. |
| file isfile name | Returns 1 if name is not a directory, symbolic link, or device, else 0. |
| file join path path... | Joins pathname components into a new pathname. (Tcl 7.5) |
| file lstat name var | Places attributes of the link name into var. |
| file mkdir name | Creates directory name. (Tcl 7.6) |
| file mtime name | Returns modify time of name as a decimal string. |
| file nativename name | Returns the platform-native version of name. (Tk 8.0). |
| file owned name | Returns 1 if current user owns the file name, else 0. |
| file pathtype name | relative, absolute, or driverelative. (Tcl 7.5) |
| file readable name | Returns 1 if name has read permission, else 0. |
| file readlink name | Returns the contents of the symbolic link name. |
| file rename ?-force? old new | Changes the name of old to new. (Tcl 7.6) |
| file rootname name | Returns all but the extension of name (i.e., up to but not including the last . in name). |
| file size name | Returns the number of bytes in name. |
| file split name | Splits name into its pathname components. (Tcl 7.5) |
| file stat name var | Places attributes of name into array var. The elements defined for var are listed in Table 9-3. |
| file tail name | Returns the last pathname component of name. |
| file type name | Returns type identifier, which is one of: file, directory, characterSpecial, blockSpecial, fifo, link, or socket. |
| file writable name | Returns 1 if name has write permission, else 0. |