Is there a way to only show result files from folders that do NOT contain a specific file already?
I have a bunch of folders that contain images. Some already contain an index.jpg file. I want to exclude the ones that already have that index.jpg file, while still showing all the image files from other folders.
I've looked at the !child-file:index.jpg function but that only returns me the folders that don't contain the index.jpg file.
I could, of course, exclude the index.jpg image file itself, but that wouldn't exclude the files from the folders that have it already. I don't need to see ANY of the image files from folders that already have an index.jpg.
My end-goal here is to use the advanced rename function on manually selected files. But if the folder already contains the name then I get the rename error dialog.
Is there a way to do this?
My alternative would be to use the !child-file: function and move the folders to somewhere else temporarily, and then do the selecting/renaming.
Exclude folders that contain a specific file from results?
-
- Posts: 17
- Joined: Sun Nov 07, 2021 2:42 pm
Re: Exclude folders that contain a specific file from results?
If I understood correctly (?), this should give you the desired results:
If this is not what you wanted, please provide some (more or less) real-world examples.
Code: Select all
pic: !exact:sibling:index.jpg !exact:index.jpg
If this is not what you wanted, please provide some (more or less) real-world examples.
-
- Posts: 44
- Joined: Thu Sep 27, 2018 4:46 pm
Re: Exclude folders that contain a specific file from results?
I brought up something similar here: viewtopic.php?p=60046#post_content60047
NotNull said he would consider something like it viewtopic.php?p=60083#post_content60083
The difference between my suggestion & what you're asking: I was looking for something more like !ancestor: (I believe !parent:'s already an existing function) that can be used to build queries. For example:
!< child-file:".everything-search-ignore" >
!< child-file:extension:"everything-search-ignore" >
I took inspiration for ancestor from xpath. I'd love to be able to do full xpath queries on the filesystem & all it's attributes (in bookmarks, filters, & macros) like:
//*[self::folder or self::file][not(ancestor::folder[@attributes=HCI]/descendant::file/sibling::file[@extension='jpg'][@perceivedType='image'][contains(@name, 'index')])]
Imagine the power
NotNull said he would consider something like it viewtopic.php?p=60083#post_content60083
The difference between my suggestion & what you're asking: I was looking for something more like !ancestor: (I believe !parent:'s already an existing function) that can be used to build queries. For example:
- !ancestor:attributes:HDI to filter all children with an ancestor that's a (H)idden, (D)irectory, Not(I)ndexed. One could easily exclude entire directory trees by right clicking a folder, selecting properties & in the General tab, checking "Hidden" & unchecking "Allow files in this folder to have contents indexed in addition to file properties"
- !ancestor:owner:<"SYSTEM"|"TrustedInstaller"|"SERVICE"> would filter out a whole lot of noise for my typical searches. This is just an example of course. My real goal is to be able to combine this with more terms, like:
!ancestor:< attributes:HD owner:"SYSTEM"|"TrustedInstaller"|"SERVICE" > - If an ancestor function existed, I imagine something like this would work for your scenario:
!ancestor:child-file:index.jpg
!< child-file:".everything-search-ignore" >
!< child-file:extension:"everything-search-ignore" >
I took inspiration for ancestor from xpath. I'd love to be able to do full xpath queries on the filesystem & all it's attributes (in bookmarks, filters, & macros) like:
//*[self::folder or self::file][not(ancestor::folder[@attributes=HCI]/descendant::file/sibling::file[@extension='jpg'][@perceivedType='image'][contains(@name, 'index')])]
Imagine the power
-
- Posts: 17
- Joined: Sun Nov 07, 2021 2:42 pm
Re: Exclude folders that contain a specific file from results?
Yes! Using it along with depth: helped narrow down to just the directories I needed (and none of the subdirectories). Thanks!
That and using !string to exclude others also helped.
That and using !string to exclude others also helped.
Re: Exclude folders that contain a specific file from results?
Just wondering, is it expected behavior that ticking "Search > Match Path" gives no results when doing exact:<filename>?NotNull wrote: ↑Thu Oct 26, 2023 7:49 pm If I understood correctly (?), this should give you the desired results:Code: Select all
pic: !exact:sibling:index.jpg !exact:index.jpg
If this is not what you wanted, please provide some (more or less) real-world examples.
Re: Exclude folders that contain a specific file from results?
Yes, enabling match path from the Search menu will force Everything to match the path and the name.
With match path enabled, you would need to search for:
!exact:"C:\folder A\folder B\index.jpg"
(where C:\folder A\folder B is the location of your index.jpg)
If you want to keep match path enabled under the Search menu, please try the following search:
pic: !exact:sibling:index.jpg !exact:name:index.jpg
The name: search function will match only the name part (ignoring your Match Path setting)
name:
Match Path
With match path enabled, you would need to search for:
!exact:"C:\folder A\folder B\index.jpg"
(where C:\folder A\folder B is the location of your index.jpg)
If you want to keep match path enabled under the Search menu, please try the following search:
pic: !exact:sibling:index.jpg !exact:name:index.jpg
The name: search function will match only the name part (ignoring your Match Path setting)
name:
Match Path
Re: Exclude folders that contain a specific file from results?
void, you are way too fast!
(deletes message ...)
Oh wait:
nopath:exact: could help here too
(deletes message ...)
Oh wait:
nopath:exact: could help here too
Re: Exclude folders that contain a specific file from results?
Thank you for the clarification. I was initially confused because this page under "Match Path" said match path/filename OR just filename. So I assumed exact: would account for both.
Also did not know about nopath, so thanks to both of you!