MEDx Frequently Asked Questions - Scripting

Q:How does one write to a text file on disk from a tcl program?

Here is a sample piece of code that you can use as reference:

#
# This program will write a sentence to a file called WriteFile in /tmp.
#
set file [open /tmp/WriteFile w]

puts $file " Writing to a file"
puts $file " ------------------"
flush $file
close $file


Other FAQ Topics

If you have a question that you would like to see addressed in our list of Frequently Asked Questions, please contact customer support.

Back to FAQ Home