0

I am using Ttermpro.exe to run TTL file. After that, teraterm will display all the output. I want to insert the display in teraterm into logfile.txt by using batch file command. Any idea on how to resolve this problem?

"C:\Program Files (x86)\teraterm\ttermpro.exe" /L=C:\0465\PCU 90000465\UartLog.txt "C:\0465\PCU 90000465\COM.TTL"
wan cine
  • 61
  • 1
  • 2
  • 9
  • Possible duplicate of [How to run Teraterm and TTL file using Batch file?](https://stackoverflow.com/questions/53058951/how-to-run-teraterm-and-ttl-file-using-batch-file). Do not create a new version of a question you've already asked; delete this question and edit your other. – Compo Oct 31 '18 at 07:32

1 Answers1

0

I don't know if this answers your problem directly, but based on what I think you're saying, try:

In the teraterm ttl file, include this to avoid the logging command in TTermPro:

 logopen 'C:\0465\PCU 90000465\UartLog.log' <binary flag> <append flag>
 ... more content
 ... and when done
 logclose

The binary flag and append flag can both be set to zero, but you can find more info here: https://ttssh2.osdn.jp/manual/en/macro/command/logopen.html

Generally, I thought the log file was a .log extension, but if you really want it to become a .txt file, you could also add after the logclose function

 filerename 'C:\0465\PCU 90000465\UartLog.log' 'C:\0465\PCU 90000465\UartLog.txt'

As far as the batch file goes, you'd simply change directories to the teraterm TTermPro executable and then run the command to execute the macro.

 cd C:\Program Files\teraterm
 TTERMPRO /M="C:\0465\PCU 90000465\COM.TTL"

but you can also achieve the same thing just using the TTPMacro as

 cd C:\Program Files\teraterm
 TTPMacro /M=C:\0465\PCU 90000465\COM.TTL

Just save one of those two sets of commands as a .bat file and that should hopefully work.

J. Doe
  • 83
  • 4