Is there a way to run non-Tcl commands and programs from a Tcl script.
When running non-Tcl commands from my Tcl script, I receive an 'invalid command name' message.
I encountered the following error when running a Tcl file with a compxlib command.
The 'invalid command name' message comes because the program command being executed is not a Tcl command.
Tcl scripts use "exec" to invoke other programs.
For the example above, the error will be removed by adding "exec" as below:
execcompxlib -s questa -l verilog -arch all -lib all -w -dir C:\work\
When attempting to execute an application, exec first searches for the name as it was specified.
Then, in order, .com, .exe, and .bat are appended to the end of the specified name and it searches for the longer name.
The user should ensure that the command "executable" being executed is in the system PATH or provide the complete path to the executable within the exec command.
In Windows, in order to execute the shell built-in commands like dir and copy, the caller must prepend `cmd.exe /c' to the desired command.
exec cmd /c (dir c:\\Xilinx)