Abrindo um arquivo de texto no notepad ++ e atualizando-o em intervalos regulares usando um arquivo bat

1

Eu quero abrir um documento de texto no notepad ++ através do arquivo bat que eu consegui.

este é o comando que estou usando para abrir um arquivo. % SystemRoot% \ explorer.exe "D: \ caminho do arquivo \ file.log"

Em segundo lugar, como o arquivo está sendo atualizado por algum meio externo, eu quero atualizá-lo em intervalos regulares de tempo. Eu preciso de um comando para o arquivo bat para fazer isso.

    
por tushar 19.05.2014 / 09:01

1 resposta

1

para abrir seu arquivo no notepad ++ automaticamente, apenas passe-o para o notepad ++:

"C:\Program Files (x86)\Notepad++\notepad++.exe" "D:\path of file\file.log"

Para que seja atualizada automaticamente, essa resposta já foi respondida na SU: Como recarregar automaticamente arquivos modificados no Notepad ++

Settings -> Preferences -> MISC -> Update silently

ou

There is a nice plugin called Document monitor (Can be found and installed from the Plugins => Plugin Manager => show Plugin Manager menu),
It updates the opened files every 3 seconds. Together with the option to "scroll to last line after update", it will have the ability to "tail" a log file as wanted.
After the plugin installation don't forget to activate it by clicking:
Plugins => Document monitor => start to monitor
    
por 20.05.2014 / 09:10