Good that you got something you could use from that!
Actually, this is probably a good opportunity to show off macros in Notepad++.
First, do some (one-time) setup:
Press the toolbar button for starting macro recording In an editing tab view, press an arrow key to move the caret (this is just a dummy action) Press the toolbar button for stopping macro recording Press the toolbar button for saving a recorded macro; give it the name Bat file from Find results and save it Exit Notepad++ Restart Notepad++ Locate your shortcuts.xml file and open it in Notepad++ Do a find on Bat file from Find results and you should be left looking at something like this: <Macro name="Bat file from Find results" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="0" message="2306" wParam="0" lParam="0" sParam="" /> </Macro> Replace the Action line with the following block, making the indent level of the block match that of the old Action line: <Action type="3" message="1700" wParam="0" lParam="0" sParam="" /> <Action type="3" message="1601" wParam="0" lParam="0" sParam="(?-s)^Search.+\R" /> <Action type="3" message="1625" wParam="0" lParam="2" sParam="" /> <Action type="3" message="1602" wParam="0" lParam="0" sParam="" /> <Action type="3" message="1702" wParam="0" lParam="770" sParam="" /> <Action type="3" message="1701" wParam="0" lParam="1609" sParam="" /> <Action type="3" message="1700" wParam="0" lParam="0" sParam="" /> <Action type="3" message="1601" wParam="0" lParam="0" sParam="(?-s)^\tLine.+\R" /> <Action type="3" message="1625" wParam="0" lParam="2" sParam="" /> <Action type="3" message="1602" wParam="0" lParam="0" sParam="" /> <Action type="3" message="1702" wParam="0" lParam="770" sParam="" /> <Action type="3" message="1701" wParam="0" lParam="1609" sParam="" /> <Action type="3" message="1700" wParam="0" lParam="0" sParam="" /> <Action type="3" message="1601" wParam="0" lParam="0" sParam="\s\(\d+\shits?\)$" /> <Action type="3" message="1625" wParam="0" lParam="2" sParam="" /> <Action type="3" message="1602" wParam="0" lParam="0" sParam='" .' /> <Action type="3" message="1702" wParam="0" lParam="770" sParam="" /> <Action type="3" message="1701" wParam="0" lParam="1609" sParam="" /> <Action type="3" message="1700" wParam="0" lParam="0" sParam="" /> <Action type="3" message="1601" wParam="0" lParam="0" sParam="^\s+" /> <Action type="3" message="1625" wParam="0" lParam="2" sParam="" /> <Action type="3" message="1602" wParam="0" lParam="0" sParam='copy "' /> <Action type="3" message="1702" wParam="0" lParam="770" sParam="" /> <Action type="3" message="1701" wParam="0" lParam="1609" sParam="" /> Save the shortcuts.xml file Exit Notepad++ Restart Notepad++That’s the end of the one-time setup. That will remain until you delete the macro created.
To use it, each time you need to:
Run a Find-in-Files search that results in several hit files Copy and paste the Find-result panel results (per the earlier instructions on how to do that) into an empty Notepad++ tab (an empty file called test.bat might be appropriate!) Go to the Macro menu and choose Bat file from Find results from near the bottom; you should observe your file of search results has changed into a bunch of copy batch file commands (this step “runs” the macro consisting of several replacement operations!) Save the file Continue from the earlier instructions at step get a cmd prompt in the directory containing...