You are looking for [file normalize]
file normalize name
Returns a unique normalized path representation for
the file-system object (file, directory, link, etc),
whose string value can be used as a unique identifier for
it. A normalized path is an absolute path which has all
"../" and "./" removed. Also it is one which is in the
"standard" format for the native platform. On Unix, this
means the segments leading up to the path must be free of
symbolic links/aliases (but the very last path component
may be a symbolic link), and on Windows it also means we
want the long form with that form's case-dependence
(which gives us a unique, case-dependent path). The one
exception concerning the last link in the path is
necessary, because Tcl or the user may wish to operate on
the actual symbolic link itself (for example file delete,
file rename, file copy are defined to operate on symbolic
links, not on the things that they point to).
Example:
/tmp/subdir1/subdir2$ cat this-script.tcl
#!/usr/bin/tclsh
puts "\[info script]=[info script]"
puts "\[file normalize \[info script]]=[file normalize [info script]]"
/tmp/subdir1/subdir2$ ./this-script.tcl
[info script]=./this-script.tcl
[file normalize [info script]]=/tmp/subdir1/subdir2/this-script.tcl
/tmp/subdir1/subdir2$ tclsh this-script.tcl
[info script]=this-script.tcl
[file normalize [info script]]=/tmp/subdir1/subdir2/this-script.tcl
/tmp/subdir1/subdir2$ ../subdir2/this-script.tcl
[info script]=../subdir2/this-script.tcl
[file normalize [info script]]=/tmp/subdir1/subdir2/this-script.tcl
/tmp/subdir1/subdir2$ tclsh ../subdir2/this-script.tcl
[info script]=../subdir2/this-script.tcl
[file normalize [info script]]=/tmp/subdir1/subdir2/this-script.tcl