Find results - Copy name of files (without hits)
-
hello. I want to find results on “search in files” option, copy name of files (without hits result), and to delete those files. How can I do that?
-
Hello @vasile-caraus and All,
Not very difficult, indeed !
-
Do your search in files (
Ctrl + Shift + F) -
Once the Find Result panel opened, right-click inside and choose the option
Select all -
Hit the shortcut
Ctrl + C( Do NOT use theCopyoption of the context menu ! ) -
Open a new tab (
Ctrl + N) -
Paste the clipboard (
Ctrl + V) -
Now, in that new file, perform the following regex S/R :
-
SEARCH
(?-si)^(?:(Search).+|\x20\x20(.+)\(.+?\)$|\t.+\R) -
REPLACE
(?1echo @OFF)(?2Del\x20\2\x20/p) -
Save this new file, in your N++ directory, as, let’s say
Suppression.bat -
Execute the option
Run > Run...( of hit theF5key ) -
Type in the command
cmd /k Suppression.bat -
Valid the suppression of each file, by answering
y -
Close the DOS window
Et voilà !
Remark : If your prefer to delete all files in one go, change the Replace zone as
(?1echo @OFF)(?2Del\x20\2)Best Regards,
guy038
-