| |
set prj_dir [pwd];
proc file_search {file_dir file_name} {
set path_list ""
if {[file exists $file_name] == 1} {
file attributes $file_name -hidden 0
}
if {[glob -directory $file_dir -nocomplain -- $file_name] != ""} {
append path_list [glob -directory $file_dir -nocomplain -- $file_name]\n;
}
foreach sub_dir [glob -directory $file_dir -type d -nocomplain *] {
append path_list [file_search $sub_dir $file_name];
}
return $path_list;
}
set file_list [file_search $prj_dir .tmp]
foreach file_list_all $file_list {
file delete -force $file_list_all
}