proc H2F {hexstring filepath} { foreach hex $hexstring { append bin [binary format c $hex] } set f [open $filepath w+] fconfigure $f -translation binary puts -nonewline $f $bin close $f }