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.


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


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.