I am working with 3 log files in notepad++.
Is there a way the clear the contents of all three files at once in one or two clicks?
I’ve searched plugins but couldn’t find anything. A macro, from what i’ve tried, records the activity in the active file, so if i change files it won’t record that.
A solution would help me alot, thanks.
EDIT: Also it would be great to save the files once they are cleared.
Isn’t there something like batch commands to do in notepad++.
(by the way i also tried batch commands to clear the files but then i get that the file is being used by the system, so i concluded that it’s only possible from the text editor)
Record a macro (
Macro --> Start Recording) where you perform the following stepsSearch --> Replace...Regular expression^.*(\r\n)*Replace withReplace All in All Opened DocumentsOkandCloseSave AllbuttonStop the macro recording (
Macro --> Stop Recording) and save it (Macro --> Save Current Recorded Macro). From the save dialog you can assign a shortcut to the macro.Now you can run this macro at any time with the shortcut you assigned.
I have confirmed that this works on
Notepad++ 6.2.2. On 5.8.1 however the regex does not work.