Find with list of no matches

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
hermhart
Posts: 213
Joined: 13 Jan 2015 18:41

Find with list of no matches

Post by hermhart »

This may be a little far fetched, but if I do a find of a very long list of delimited search names, is it possible to get a list of what there were no matches for as well?

Example:
Find Name: 123;234;345 etc

Somehow get a list if it did not find anything matching: 234 etc

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Find with list of no matches

Post by jupe »

If I am understanding you correctly, you can just suffix your search term with
 /i
which will show everything that doesn't match your search

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Find with list of no matches

Post by highend »

I guess he wants to know which of these (single) patterns in the delimited list of all patterns did not find a result

Sure, possible. But only via scripting^^
One of my scripts helped you out? Please donate via Paypal

hermhart
Posts: 213
Joined: 13 Jan 2015 18:41

Re: Find with list of no matches

Post by hermhart »

Yes, highend, what you mentioned is the goal that I am trying to attain.

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Find with list of no matches

Post by jupe »

Not sure if your interested in my janky version, but below is an outline of one way to accomplish it, you should be able to massage it into a suitable script, depending on your search terms you may need to regexescape the string:

Code: Select all

  $term   = input("enter search term with NO switch suffixes",, "123;234;345");
  $find   = quicksearch($term, , , "s");
  $findN  = report("{Name}<crlf>", $find);
  $nomtch = "";
  foreach($q, $term, ";", "e") { if !(regexmatches($findN, $q)) { $nomtch .= "$q<crlf>"; } }
  if ($find)   { paperfolder("TEMP-<date ddmmyyyy>", $find); }
  if ($nomtch) { text $nomtch; }
currently the search just runs in curpath and is recursive, modify as required.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Find with list of no matches

Post by highend »

@jupe

I can't recommend doing this: $findN = report("{Name}<crlf>", $find);
If you have e.g. a list of 50k matches, this is a very time consuming process

Instead of escaping the pattern you could use a formatlist() to achieve the same (mind the last arg with "f")
One of my scripts helped you out? Please donate via Paypal

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Find with list of no matches

Post by jupe »

Well the op is free to change whatever he likes if he is going to have results that large, I was just providing a quick outline using cmds that should be understandable for people new to scripting, which to me is more useful when posting on the forum, than using regex which can appear as incomprehensible to some people, so could actually discourage people from trying to learn scripting because they might think it is required.

hermhart
Posts: 213
Joined: 13 Jan 2015 18:41

Re: Find with list of no matches

Post by hermhart »

Thanks for the script, guys, this gives me a good place to start. Sorry for the delay in responding, didn't get an email letting me know there were updates.

Post Reply