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
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login