LogMeTT.com • How to get the size of a file / log ??
Page 1 of 1

How to get the size of a file / log ??

Posted: Tue Jun 20, 2017 3:37 am
by Mokan
any commands to get the size of the log/file ??
show total number of lines in a log??

Re: How to get the size of a file / log ??

Posted: Fri Jun 23, 2017 8:59 am
by Trevor
I don't think so but you could call something outside of Tera Term (e.g. a batch file) to do this and return to the macro. See exec command here: http://ttssh2.osdn.jp/manual/en/macro/command/exec.html.
e.g.

Code: Select all

  1. exec 'cmd /c c:\get-log-file-info.bat'

Re: How to get the size of a file / log ??

Posted: Fri Jun 30, 2017 5:58 am
by Mokan
Trevor wrote:I don't think so but you could call something outside of Tera Term (e.g. a batch file) to do this and return to the macro. See exec command here: http://ttssh2.osdn.jp/manual/en/macro/command/exec.html.
e.g.

Code: Select all

  1. exec 'cmd /c c:\get-log-file-info.bat'


Hi there thank you for the advice I'm sorry I'm keeping on asking questions is there any way in tera term to compare previously logged file and the current logged file?

Re: How to get the size of a file / log ??

Posted: Fri Jun 30, 2017 2:57 pm
by Trevor
Hi,
It depends on what do you mean by compare. You can calculate the CRC of a file using macro. If two files have the same CRC then they will be the same. See http://ttssh2.osdn.jp/manual/en/macro/command/crc32.html.

If you mean visually compare, then outside of macro there are lots of tools for comparing text files e.g. winmerge or beyond compare.