Advanced file name search and deletion.

General discussion related to "Everything".
Post Reply
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Advanced file name search and deletion.

Post by Debugger »

I want to find 100,000+ file names in a folder and delete (I have a list of unique names in the text file for this)
But I can't imagine creating a super long regex in Everyting. regex: (filename1|filename2|filename3) etc.
Of course it is possible, maybe not in Everything.
Unlimited length of the regular expression (support other software), but it will consume almost 100% cpu and extend the time, but I note that it is possible. But very impractical.
How to solve this problem quickly and simply.
I am asking for any suggestions and ideas.
tuska
Posts: 1098
Joined: Thu Jul 13, 2017 9:14 am

Re: Advanced file name search and deletion.

Post by tuska »

Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Advanced file name search and deletion.

Post by Debugger »

tuska - I read from A to Z and found no solution.
Everything only supports up to 10,000 regex characters.

Please, explain it better step-by-step, because it is not understandable to me. Thanks.
tuska
Posts: 1098
Joined: Thu Jul 13, 2017 9:14 am

Re: Advanced file name search and deletion.

Post by tuska »

Hi,
Debugger wrote:I want to find 100,000+ file names in a folder and delete (I have a list of unique names in the text file for this)
Example - Content of "Testfolder.txt":
Everything.db
Everything.exe
Everything.ini

Follow the steps shown here.
Advanced file name search and deletion.png
Advanced file name search and deletion.png (83.42 KiB) Viewed 15094 times
See also: viewtopic.php?p=25286#p25286
... the search box is limited to 2 billion characters. ...
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Advanced file name search and deletion.

Post by Debugger »

What you have shown is just unnecessary fun in commands, I can create regex and paste into Search much faster.
Invent something brilliant (more simpler and faster).
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: Advanced file name search and deletion.

Post by NotNull »

Debugger wrote: Wed Mar 04, 2020 6:08 pm What you have shown is just unnecessary fun in commands, I can create regex and paste into Search much faster.
Invent something brilliant (more simpler and faster).
@debugger: This is as simple and especially fast as it gets. If you know anything faster ... entertain me (and use that instead).

Furthermore: it is obvious that @tuska has spent quite some time coming up with this (very good) answer and describing it in detail, even though it was already described in the thread he linked (and that you read from A to Z ..).
The very least you can do is show some gratitude. And in this case: a lot of gratitude. There are not many people left that are still willing to answer your questiuons.
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Advanced file name search and deletion.

Post by Debugger »

[bgcolor=]NotNull[/bgcolor] - A handful of useful knowledge... it's a fact, but it doesn't change the fact that I still don't understand how to import a large, really large list of file names.
tuska
Posts: 1098
Joined: Thu Jul 13, 2017 9:14 am

Re: Advanced file name search and deletion.

Post by tuska »

2Debugger
Hello my friend,

let's try again.
But be aware that if I get an answer like that above again, then that was my last post for you.

01. 'Everything' - the following setting is required - please do the following in the search box of 'Everything':
      Type in /paste_new_line_op=1 and press the <ENTER> key (and watch the status line ...)
      http://www.voidtools.com/support/everyt ... ew_line_op
02. Type in /monitor_pause and press the <ENTER> key (and watch the status line ...); then restart 'Everything'
      http://www.voidtools.com/support/everyt ... itor_pause
03. Create a filter for the path in which the files to be deleted are located, eg D:\Testfolder
      Menu "Search" - "Organize Filters ..." - Click the "New..." button - Name: eg Testfolder - Search: D:\Testfolder\ - OK
04. Now switch ON the filter
05. In your text file, eg Testfolder.txt, you have a large number of file names that you want to delete later
06. Open the text file, e.g. Testfolder.txt
      a) Only the name of a file to be searched may be in one line (!)
      b) At the end, no more <ENTER> may be carried out in the last line of text (!) -> if <ENTER> is present, then delete it(!)
07. Mark the text files to be deleted - CTRL + A
08. Press CTRL + C (copy to the clipboard)
09. Change to the search box of 'Everything'
10. Press CTRL + V (paste from clipboard)
11. In 'Everything' you should see now the files to be deleted (filter switched ON!)
12. Click on the first file, then press CTRL + A (all files are now selected)
13. use SHIFT-DELETE to delete the files instead of the context menu -> at your own risk!
      FINISH!
14. Enter the following in the search line of 'Everything':
      /monitor_resume and <ENTER> key (and watch the status line ...); then restart 'Everything'
      http://www.voidtools.com/support/everyt ... itor_pause
15. Option: switch OFF filter
16. Option: In the search box of 'Everything' enter the following:
      /paste_new_line_op=0 and press the <ENTER> key (and watch the status line ...)
      http://www.voidtools.com/support/everyt ... ew_line_op

Good luck!

EDIT:
14. /resume ... corrected to ... /monitor_resume
See also: Everything 1.4.1.967 fixes an issue with -monitor-pause not working as intended.
Last edited by tuska on Sat Mar 07, 2020 12:12 pm, edited 1 time in total.
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Advanced file name search and deletion.

Post by Debugger »

Over 15 operations. And will I always have to bother with this?
Maybe it would be better if he simply added paths to each file I knew.
And I won't have to look for the path anymore. Because these are very simple paths.

Mini-example:

List path-file delete
C:\PR\2000_10_26-06.html
C:\PR\2010_12_26-876.html
C:\PR\2013_05_26_6.html
tuska
Posts: 1098
Joined: Thu Jul 13, 2017 9:14 am

Re: Advanced file name search and deletion.

Post by tuska »

Point 01. only needs to be run once(!)
Point 02. can be omitted on a trial basis
Point 03.+04. Filter is omitted if path and file name (per line) are specified in the text file *)

*)
D:\Testfolder\Everything.db
D:\Testfolder\Everything.exe
D:\Testfolder\Everything.ini

'Everything' - search box:
<D:\Testfolder\Everything.db>|<D:\Testfolder\Everything.exe>|<D:\Testfolder\Everything.ini>
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Advanced file name search and deletion.

Post by Debugger »

After all, I'm looking for a dedicated tool that allows you to simply paste a path list and just click delete button without going into details.

But does such a simple tool exist?

https://www.google.pl/search?q=multiple ... 20&bih=965
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Advanced file name search and deletion.

Post by Debugger »

OR cmd ???

del C:\PR\2000_10_26-06.html
del C:\PR\2010_12_26-876.html
del C:\PR\2013_05_26_6.html

Save as.. „del_list.bat”.
tuska
Posts: 1098
Joined: Thu Jul 13, 2017 9:14 am

Re: Advanced file name search and deletion.

Post by tuska »

Debugger wrote: Thu Mar 05, 2020 6:38 pm After all, I'm looking for a dedicated tool that allows you to simply paste a path list
and just click delete button without going into details.
Unfortunately, I don't know of any tool that can handle your request in 2 steps.

In Total Commander, for example, these steps would be required:
1. ALT+SHIFT+F7 - Search in separate process...
2. Field "Search in:" @D:\Testfolder\Testfolder_with-Path.txt
3. Click on button "Start search" | ☑ 'Everything'
4. Click on button "Feed to listbox"
5. CTRL+A or Ctrl Num+ (Select All)
6. DELETE...
Debugger wrote: Thu Mar 05, 2020 8:44 pm OR cmd ???
I'm sorry, but I can't help you here any further, because I am only a user and not a programmer.
tuska
Posts: 1098
Joined: Thu Jul 13, 2017 9:14 am

Re: Advanced file name search and deletion.

Post by tuska »

Nice that you have found a solution for yourself and that you make this solution available to other forum participants. :)
horst.epp
Posts: 1458
Joined: Fri Apr 04, 2014 3:24 pm

Re: Advanced file name search and deletion.

Post by horst.epp »

tuska wrote: Fri Mar 06, 2020 1:27 pm
Nice that you have found a solution for yourself and that you make this solution available to other forum participants. :)
But only for users with an C# compiler :(
Post Reply