I'm trying to split the following string : Groups/Group#1.rpt to get only the word Group#1.rpt using tcl ; I did the following but the output was empty :
set verifyFile "Groups/Group#1.rpt"
set verify_file_name [echo $verifyFile |cut -d "/" -f 2]
Donal's file tail answer is perfect for removing the directories from a file path.
If you have a "CSV" string using slash as the delimiter, you can use split and lindex
set verify_file_name [lindex [split $verifyFile /] end]