glob

glob *.tcl

Find all the Tcl files in the user's home directory, irrespective of what the current directory is:

glob -directory ~ *.tcl

Find all subdirectories of the current directory:

glob -type d *

Find all files whose name contains an "a", a "b" or the sequence "cde":

glob -type f *{a,b,cde}*
 
set Path "/home/name"
set pattern "movie-*"
 foreach file [glob -directory [Path pics] $pattern.gif]  {
}
 
 
posted @   greencolor  阅读(222)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示