I have a folder with many TCL files, and I need to run them all (in Vivado). How can I save time in running all of them at once? Is there something as easy as: source [path/]*.tcl ?
How about
foreach script [glob -nocomplain -dir $dir *.tcl] {source $script}
?
Documentation: foreach, glob, source
You could first just find all tcl files with the glob command and then go though the list of tcl files and source them.
set $dir your/path
foreach file [glob -dir $dir */*.tcl] {
source $file
}
Edit: In difference to Peters example this solution also sources .tcl files in subdirectories (Be sure you want this).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With