I want to parse the output of the
\showbox command externally. Is it possible to let
\showbox write to another file than the .log file? If not, is it possible to temporarily change the name of the .log file?
I'm afraid the answer is 'no': TeX is hard-wired to write to a
.log file, and
\show... commands write to the log. As such, you'll need to use some lateral thinking, for example using an auxiliary compilation just for the
\showbox part or writing markers to surround the
\showbox section of your log.