View Log with TYPE command

2

I'm using the type command to display a point log in the company, but it does not show the contents of the entire log, just the last lines.

type C:\PASTA\LOG-TESTE.log 

@echo off
pause
  • The parameter | MORE in the type command does not work for me because the user would have to scroll down the page using the keyboard until the last line.

Any solution?

    
asked by anonymous 19.09.2018 / 15:05

1 answer

0

As for appearing at the end of the file there is nothing to do, since the type list is adding in the buffer of the screen and stops at the end. If you want to see the whole file you have to scroll the bar to the beginning.

As for the size of the file, if it is too large, the buffer will not support it and will "cut" the content. In this case, you can change the buffer and size of the screen to hold all the contents of the file using the mode command.

The command mode allows, among other things, to change the number of rows / columns, so this should solve your problem, for example setting this before type:

mode con:cols=120 lines=5000

If the file is larger, you can increase the columns and rows until you meet your needs

    
19.09.2018 / 15:22