如何使用一行 TCL 命令从列表中复制文件?

How to copy files from a list with a one line TCL command?

我有一个变量下的文件路径列表,我想将其复制到另一个目录。我不会使用 while 循环或 for 循环将文件推送到另一个目录。我可以使用什么命令行来执行此操作?

set list_files {some_directory/here1.txt some_directory/here2.txt some_directory/here3.txt}
set other_directory "/new_directory"

这是您要使用扩展的地方 file copy:

file copy {*}$list_files $other_directory