Luc <
luc...@gmail.com> wrote:
> [file join] is a completely wrong answer. It would concatenate my
> prefix and file name with a forward slash, creating a directory where
> it's not wanted.
No. 'file join' is the correct answer. But if you want to create, in
Tcl, a filename with a space, you need to make sure to enclose that
string in double quotes, because otherwise 'file join' sees two
parameters, and puts in a slash between the parameters.
I.e., you need the entire filename you want to use to be the *last*
parameter to 'file join'.
Your response above says you were doing this:
% file join dir1 dir2 dir3 name_prefix name_suffix
dir1/dir2/dir3/name_prefix/name_suffix
when you should have done this:
% file join dir1 dir2 dir3 "name_prefix name_suffix"
dir1/dir2/dir3/name_prefix name_suffix
Note the *significant* difference. The first has a last parameter of
just "name_suffix", the second has a last parameter of
"name_prefix name_suffix". Understanding the importance of this
distinction is critical.