Re: Newbie Tcl Question
- From: Stephan Kuhagen <skuhagen@xxxxxx>
- Date: Sun, 29 Jul 2007 12:16:44 +0200
khannu@xxxxxxxxx wrote:
In Tcl, how can I extract the file name from a string that contains
the fullpath to the file, like so: C:\results\log\file.txt
How can I retrieve the 'file.txt' substring from the above string?
file tail {C:\results\log\file.txt}
HTH
Stephan
.
Relevant Pages
- Re: string handle problem
... I encountered a string handle problem and need help. ... >I knew I can use split command and then handle the list to get the last ... >I'm thinking to use regexp, but regexp handle string in order from left ... This MIGHT be doable using the [file tail] ... (comp.lang.tcl) - Re: Plz help me
... | file tail $string ... It probably would on platforms where the directory path separator is "/". ... (comp.lang.tcl) - Re: Q: how to remove stuff from string?
... of a string? ... % file rootname $file ... % file tail $file ... (comp.lang.tcl) - Re: String Functions
... > function to retrieve the substring from a starting index to an end index? ... length of the string minus the number of Right$ characters you want. ... Emulating Left$ or Mid$ is more difficult, as you need to modify the ... (comp.lang.c) - Re: String Functions
... > I easily forget which string manipulation functions are what in C. ... > function to retrieve the substring from a starting index to an end index? ... substring sub, starting at index start and ending at end, this would look ... (comp.lang.c) |
|