1

i want to open a text document in notepad++ through bat file which i have achieved .

this is the command i am using to open a file. %SystemRoot%\explorer.exe "D:\path of file\file.log"

Secondly as the file is getting upadated by some external means, i want to refresh it at regular intervals of time. I need a command for bat file to do that.

tushar
  • 111

1 Answers1

1

to open your file in notepad++ automatically, just pass it to notepad++:

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

To have it update automatically, this answer has been answered already in SU: How to automatically reload modified files in Notepad++

either Settings -> Preferences -> MISC -> Update silently

or

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
Alex
  • 138