Searching for Folders without a specific File

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Native2904
Posts: 43
Joined: 23 Apr 2025 18:48
Location: Aachen

Searching for Folders without a specific File

Post by Native2904 »

Hi,

as a new and happy Lifetime Pro License owner, I want to learn more about working with XY.
I have a NAS folder containing many (256) movies, and in some folders there is, besides the movie.mkv file, also a picture file named "cover".
Now I want to find all folders that do not contain this cover file.
I tried it with F3 and with Ctrl+F, but in both cases I only find the cover* files, not the folders without them.

My scripting skills are very bad limited, and I asked ChatGPT — but the script it suggested doesn’t seem to work.

Code: Select all

// Alle Unterordner ohne cover*.* auflisten
  $list = "";
  foreach($folder, <getfolders <curpath>>, , "r") {
    if (exists("$folder\cover*") == 0) {
      $list = "$list$folder|";
    }
  }
  text $list;
Would anyone like to show me a way so that I have a list at the end with which I can organize the missing files?
Lts. XY-Port. ƒ Cascadia Code @ Windows 11 Pro 24H2 ▣ 1920x1080 ⇵ 115%
Glückauf

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Searching for Folders without a specific File

Post by highend »

Show the Info panel (normally F12) and in the Name & Location tab you'll enter
cover /x
in the Name: field
One of my scripts helped you out? Please donate via Paypal

bossi
Posts: 144
Joined: 30 Jul 2022 11:09
Location: Win11-latest, XYx64 latest, 4K@100%

Re: Searching for Folders without a specific File

Post by bossi »

i assume you want to mark them ?
tagitems("label", "yourlabel" , $list , );
tagitems("tags", "yourtag" , $list , );

Native2904
Posts: 43
Joined: 23 Apr 2025 18:48
Location: Aachen

Re: Searching for Folders without a specific File

Post by Native2904 »

i just wanted to say thank you!
Lts. XY-Port. ƒ Cascadia Code @ Windows 11 Pro 24H2 ▣ 1920x1080 ⇵ 115%
Glückauf

Native2904
Posts: 43
Joined: 23 Apr 2025 18:48
Location: Aachen

Re: Searching for Folders without a specific File

Post by Native2904 »

I did this search with the search pattern " /x " and found that many folders were found that contained the exclusion criterion...
What is my problem, or is this a minor bug?


I will delete this GIF after a while
Last edited by Native2904 on 26 Aug 2025 18:56, edited 2 times in total.
Lts. XY-Port. ƒ Cascadia Code @ Windows 11 Pro 24H2 ▣ 1920x1080 ⇵ 115%
Glückauf

admin
Site Admin
Posts: 64915
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Searching for Folders without a specific File

Post by admin »

"Umkehren" nicht checken. /x macht ja schon "ohne".

Post Reply