Q:

copying files in tcl

I have a query in "file copy" tcl command. I tried storing all my files to a list and used it in my command. But tcl is not recognizing those files.
for example:
    Files are abc.log , foo.log , bar.log

if these files are appended to a list say list_file and If I substitute the list_file in my command
    lappend list_file abc.log foo.log bar.log
    file mkdir ../../abc
    file copy -- $list_file ../../abc

I am getting  an error message " error copying , no file or directory". If I try the same by directly specifying the file names (instead of list) it works. Please guide me with this

A:

To elaborate on @evil-otto's answer...
{*} is only available since Tcl 8.5; for earlier versions either eval or multiple invocations could be used.
Constructing a command using eval:
set cmd [list file copy --]
lappend cmd abc.log foo.log bar.log ../../abc
eval $cmd

(Read this to learn why using lists is a must when creating commands to be evaluated.)
Multiple invocation (a no-brainer):
foreach fname $list_file {
    file copy -- $fname ../../abc
}

