How to search only 1 subdir deep?

General discussion related to "Everything".
Post Reply
klepp0906
Posts: 51
Joined: Mon Oct 28, 2019 6:25 pm

How to search only 1 subdir deep?

Post by klepp0906 »

So I found very little ala google on this, tried what I found - but couldnt seem to get it right.

I have a directory full of folders. Said folders all include a file in their root that shares the same name. I need to grab those files all together but the problem is, some of those folders also have a file with the same name nested deeper which I want to omit. I only need the file from the root of first subdirectory (folders) within the directory im searching.

Hoping im explaining this adequately. A checkbox to omit subdirectories with a box to enter a depth number would go a long ways for those of us less proficient in this area :P

and thanks to the author of the program. facepalming for waiting so long to get on board. the straw that broke this camels back was windows further neutering of the explorer search with the newest update. its dead to me now ;p
therube
Posts: 5003
Joined: Thu Sep 03, 2009 6:48 pm

Re: How to search only 1 subdir deep?

Post by therube »

parents:

parents:4 klep

finds 15-Kleptomania.mp3 in M:\MUSIC\fun\Leonard Richardson

but not Kleptomania.mpeg in D:\OUT\

(as that would be parents:2)
klepp0906
Posts: 51
Joined: Mon Oct 28, 2019 6:25 pm

Re: How to search only 1 subdir deep?

Post by klepp0906 »

therube wrote: Mon Dec 02, 2019 1:25 pm parents:

parents:4 klep

finds 15-Kleptomania.mp3 in M:\MUSIC\fun\Leonard Richardson

but not Kleptomania.mpeg in D:\OUT\

(as that would be parents:2)
thank you for the reply, but I wasnt able to get this right either. Could be my own inexperience - or could be a misunderstanding in what im after. Let me give you some more exact path's.

Here is my directory im trying to search
G:\Games\Consoles\Microsoft - Xbox 360\Game Discs

within it are numerous folders such as
G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\Hitman HD Trilogy (USA)
G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\Iron Man (USA)
etc...

all of those folders contain numerous files and subfolders.

one file exists in the root of every one of those folders called default.xex

I need to grab all of them, the problem is, when i search I end up with more of them than their are folders due to the fact that some have multiple default.xex nested in subfolders for example....

G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\Hitman HD Trilogy (USA, Europe) contains
G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\Hitman HD Trilogy (USA, Europe)\HMC\default.xex as well as
G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\Hitman HD Trilogy (USA, Europe)\HMSA\default.xex

i hope this makes more sense. If you understood me the first time, then its just me being slow :P


edit: still mucking with this. Based on your example i tried.
parents: 2 "G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\" default.xex

hoping to find
G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\007 Legends (USA)\default.xex
G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\2010 FIFA World Cup South Africa (USA)\default.xex

etc.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How to search only 1 subdir deep?

Post by NotNull »

the parents: function is also known as depth:
(see the Serach Help page for that and (much) more

Maybe that makes it a bit easier to understand?
Depth is counted from the root, in your case G:
So for G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\007 Legends (USA)\default.xex, that means default.xex has depth:6 (if I counted correctly)

With that, you can search for:

Code: Select all

 "G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\"    default.xex     depth:6
(replace depth:6 with parents:6 if you like that one better)
(don't forget the "" around the folder as it contains spaces)
klepp0906
Posts: 51
Joined: Mon Oct 28, 2019 6:25 pm

Re: How to search only 1 subdir deep?

Post by klepp0906 »

NotNull wrote: Mon Dec 02, 2019 8:36 pm the parents: function is also known as depth:
(see the Serach Help page for that and (much) more

Maybe that makes it a bit easier to understand?
Depth is counted from the root, in your case G:
So for G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\007 Legends (USA)\default.xex, that means default.xex has depth:6 (if I counted correctly)

With that, you can search for:

Code: Select all

 "G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\"    default.xex     depth:6
(replace depth:6 with parents:6 if you like that one better)
(don't forget the "" around the folder as it contains spaces)
nooooow i get it :) thank you very much for your time!

depth does make it easier to conceptualize, but either way - i was placing the function everywhere but where it should be basically :P

before the directory, after it but before the file to be searched, inside the quotations etc lol.

very helpful to get me rolling. even outside of this specific search and function.
klepp0906
Posts: 51
Joined: Mon Oct 28, 2019 6:25 pm

Re: How to search only 1 subdir deep?

Post by klepp0906 »

Oooh, I have 1 more question. just for future reference.

does a means exist to search multiple subdirectories?

Say I wanted to get a file(s) from depth:6 and depth:7 in the same search? or depth:6 and depth:8

is this possible?
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How to search only 1 subdir deep?

Post by NotNull »

Everything has an OR function (searchA|aearchB) to combine multiple searches
Any space that is not within "" is seen as an AND function

Code: Select all

 "G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\"    default.xex     depth:6|depth:8
 
Translated:
Show all files and folders in "G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\" AND limit that to the ones that have default.xex in their names AND limit that even further by showing only the ones that are 6 OR 8 levels deep.

AND is "stronger" than OR
(see also the Help page I linked before).
klepp0906
Posts: 51
Joined: Mon Oct 28, 2019 6:25 pm

Re: How to search only 1 subdir deep?

Post by klepp0906 »

NotNull wrote: Tue Dec 03, 2019 5:20 pm Everything has an OR function (searchA|aearchB) to combine multiple searches
Any space that is not within "" is seen as an AND function

Code: Select all

 "G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\"    default.xex     depth:6|depth:8
 
Translated:
Show all files and folders in "G:\Games\Consoles\Microsoft - Xbox 360\Game Discs\" AND limit that to the ones that have default.xex in their names AND limit that even further by showing only the ones that are 6 OR 8 levels deep.

AND is "stronger" than OR OR is "stronger" than AND
(see also the Help page I linked before).
excellent information. Ill try and reference the help page going forward. Now that i understand the fundamentals much better (at least relative to how i see myself using it).

Once again, sincere thank you for your time and help!
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How to search only 1 subdir deep?

Post by NotNull »

You're welcome! :)

Don't hesitate to ask your questions here on the forum if the help pages are not enough ..
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How to search only 1 subdir deep?

Post by NotNull »

NotNull wrote: Tue Dec 03, 2019 5:20 pm AND is "stronger" than OR
That should be:
OR is "stronger" than AND
Post Reply