Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to create a file in tcl

Status
Not open for further replies.

snowingnow

Programmer
Jun 1, 2006
32
CA
hello, I would like to create a file with tcl proc, how can i do this? thanks
 
set fid [open <file name> w]
puts $fid <whatever you want>
close $fid

_________________
Bob Rashkin
 
You can also do it on the fly with the command prompt (on Windows),

exec cmd /C echo "Whatever $var or text" > C:\\your_file

and append to the file with double >>

exec cmd /C echo "Whatever else" >> C:\\your_file
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top