Searching only folder path and not filename
Searching only folder path and not filename
Wonderful tool! My first question here.
I would like to list all files in folders whose name (folder name) matches a pattern, but it shouldn't just match the filename. For eg.
Folder File(s)
my music song1, song2, musicsong1, song4
ur music song5, song6
songs musicsong2, song7
folder1 song8, song9
If my pattern is "music", I would like to see the following files matching
my music/song1, song2, musicsong1, song4
ur music/song5, song6
It shouldn't match songs/musicsong2. If I just search for music, then it will list this also.
Is it possible to get this behavior? Actually I want to add more search terms beyond this, but basically I want to restrict my search to only those folders which has a pattern.
Thanks.
I would like to list all files in folders whose name (folder name) matches a pattern, but it shouldn't just match the filename. For eg.
Folder File(s)
my music song1, song2, musicsong1, song4
ur music song5, song6
songs musicsong2, song7
folder1 song8, song9
If my pattern is "music", I would like to see the following files matching
my music/song1, song2, musicsong1, song4
ur music/song5, song6
It shouldn't match songs/musicsong2. If I just search for music, then it will list this also.
Is it possible to get this behavior? Actually I want to add more search terms beyond this, but basically I want to restrict my search to only those folders which has a pattern.
Thanks.
Re: Searching only folder path and not filename
Please try the following searches:
"" = escape spaces
\ = match full path and filename (if there is no \ in the search term, only the filename part is matched)
space = AND
| = OR
Consider enabling Match Path from the Search Menu and searching for:
my music song1|song2|musicsong1|song4|"a song with a space"
Note: with Match Path enabled, song1, song2, musicsong1, song4 can match anywhere in the full path and filename.
"my music\" song1|song2|musicsong1|song4|"a song with a space"my music song1, song2, musicsong1, song4
"ur music\" song5|song6ur music song5, song6
songs\ musicsong2|song7songs musicsong2, song7
folder1\ song8|song9folder1 song8, song9
"" = escape spaces
\ = match full path and filename (if there is no \ in the search term, only the filename part is matched)
space = AND
| = OR
Consider enabling Match Path from the Search Menu and searching for:
my music song1|song2|musicsong1|song4|"a song with a space"
Note: with Match Path enabled, song1, song2, musicsong1, song4 can match anywhere in the full path and filename.
Re: Searching only folder path and not filename
@void: Without regex, is there any way to search for text in just the Path column, such that you see all the content from those matching paths?
I was hoping perhaps parent:*music* would work, but it requires a fully qualified path name.
@jaychris: The solution with regex is:
regex:path:"music.*\\"
(or just regex:"music.*\\")
I was hoping perhaps parent:*music* would work, but it requires a fully qualified path name.
@jaychris: The solution with regex is:
regex:path:"music.*\\"
(or just regex:"music.*\\")
Re: Searching only folder path and not filename
Thanks for replying. Probably I didn't phrase my question properly (also the post collapsed the alignment adding to the confustion). I will try to put it clearly.
What I listed originally is my file structure and not search examples (attached a picture of ls -R) which is an example to explain my requirement (I am trying to search 1000s of files)
In Everything, I want to put one search phrase to search the folder structure (in the image) which will filter out and show only
mymusic/song1
mymusic/song2
mymusic/musicsong1
mymusic/song4
urmusic/song5
urmusic/song6
and not
songs/musicsong2
I want to find all those files which are in folders, the folder names has a string. In other words, the search should only work on the folder name and not on file name (opposite of nopath:).
Partially I got the answer using \ (music\ as search string worked) but I found that if the string is part of folder name and not full (say mymusicfolder), it doesn't match. Not sure if it is possible with regex. I tried with regex and it didn't seem to work.
Just to give context, I am not a newbie, using Everything for a few years now and very good with regex, combining different criteria, etc.
Thanks.
What I listed originally is my file structure and not search examples (attached a picture of ls -R) which is an example to explain my requirement (I am trying to search 1000s of files)
In Everything, I want to put one search phrase to search the folder structure (in the image) which will filter out and show only
mymusic/song1
mymusic/song2
mymusic/musicsong1
mymusic/song4
urmusic/song5
urmusic/song6
and not
songs/musicsong2
I want to find all those files which are in folders, the folder names has a string. In other words, the search should only work on the folder name and not on file name (opposite of nopath:).
Partially I got the answer using \ (music\ as search string worked) but I found that if the string is part of folder name and not full (say mymusicfolder), it doesn't match. Not sure if it is possible with regex. I tried with regex and it didn't seem to work.
Just to give context, I am not a newbie, using Everything for a few years now and very good with regex, combining different criteria, etc.
Thanks.
- Attachments
-
- Clipboard01.jpg (17.49 KiB) Viewed 18300 times
Re: Searching only folder path and not filename
Thanks raccoon, you nailed it. My longwinded second post can be ignoredraccoon wrote: ↑Tue Jan 18, 2022 7:04 am @void: Without regex, is there any way to search for text in just the Path column, such that you see all the content from those matching paths?
I was hoping perhaps parent:*music* would work, but it requires a fully qualified path name.
@jaychris: The solution with regex is:
regex:path:"music.*\\"
(or just regex:"music.*\\")
I tried something similar with regex and it didn't work (you have pointed that too). But the pattern you gave worked and my request is addressed.
I second your request to do this without regex, but for now this is great!
Thanks.
Re: Searching only folder path and not filename
Code: Select all
_
/(|
( :
__\ \ _____
(____) `| |
(____)| | |
(____).__| |
(___)__.|___|_
Re: Searching only folder path and not filename
pathpart:foobar@void: Without regex, is there any way to search for text in just the Path column, such that you see all the content from those matching paths?
-or-
pathpart:"\program files\everything"
Hint: Right click the Path column header and click Search for Path
Re: Searching only folder path and not filename
Nice. thanks! I keep forgetting about that menu option. You did indeed tell me about basename: before... i'm dumb.
I notice that pathpart:music doesn't show any bolded match text. Not sure if intentional.
I notice that pathpart:music doesn't show any bolded match text. Not sure if intentional.
Re: Searching only folder path and not filename
It is intentional.
Highlighting regular search terms is a completely different code path than highlighting property search terms.
I'll put this on my TODO list.
Thanks for the suggestion.
Other properties that would also benefit from highlighting: parent-name:, parent-path: (path-part:), stem:, extension: and basename:
This could then lead into highlighting other properties, such as Comment or Tags.
Highlighting regular search terms is a completely different code path than highlighting property search terms.
I'll put this on my TODO list.
Thanks for the suggestion.
Other properties that would also benefit from highlighting: parent-name:, parent-path: (path-part:), stem:, extension: and basename:
This could then lead into highlighting other properties, such as Comment or Tags.
Re: Searching only folder path and not filename
@NotNull: The globbing search term: \*pathtext*\ with Match Path turned on will produce some useful results, but it will also display matching folder names into the Name column that are not in a matching Path themselves. He is looking for files and folders contained within a parent or ancestor that matches. The exercise was to discover pathpart: without knowing that I should have already known, but I was distracted by thoughts of path:, !files:, parent:.
Re: Searching only folder path and not filename
Your solution would have answered his question too.
Re: Searching only folder path and not filename
This doesn't work for me. Is this for version 1.4? Also pathpart: doesn't work in 1.4 also. Let me know if this is for 1.5 alpha. I can try that if that works.
Thanks.
Re: Searching only folder path and not filename
Does your searchtext contain a space? In that case, enclose the search in double quotes : "\*your text*\"
It should work for version 1.4 as well as 1.5.
That doesn't help us much ... What kind of results *do* you get? What kind of results are missing?
It should work for version 1.4 as well as 1.5.
It was your question ..
Re: Searching only folder path and not filename
@NotNull: (\*text*\) This is working after disabling the option Option->Search->Match whole filename when using wildcards. Thanks a lot for the help.
pathpart: still not working in 1.4 though (or I am doing something wrong).
Thanks.
pathpart: still not working in 1.4 though (or I am doing something wrong).
Thanks.
Re: Searching only folder path and not filename
Everything 1.5.0.1299a adds highlighting support to all columns.
Re: Searching only folder path and not filename
Thanks! I didn't know I needed thatvoid wrote: ↑Thu Feb 03, 2022 6:08 am Everything 1.5.0.1299a adds highlighting support to all columns.
Re: Searching only folder path and not filename
Thank you for the feedback.
stem:, basename: and extension: will now also highlight the name column.
pathpart:, parentpath: and parentname: will now highlight the path column.
Technically not all columns support highlighting, it's only 'text' columns.
stem:, basename: and extension: will now also highlight the name column.
pathpart:, parentpath: and parentname: will now highlight the path column.
Technically not all columns support highlighting, it's only 'text' columns.
Re: Searching only folder path and not filename
What does only text columns mean? Some of my columns are Dimensions and Length. I would like to make the Dimensions and Length column headers a Yellow color, so they will pop/stand out when looking at Movie and various image properties. How do I go about doing this?
Re: Searching only folder path and not filename
This conversation was about the content of columns, not their headers. Colorization of column headers has been suggested in a separate thread. That feature will not care about text vs date vs number columns, so fret not.SuperDude wrote: ↑Thu Feb 03, 2022 8:20 pm What does only text columns mean? Some of my columns are Dimensions and Length. I would like to make the Dimensions and Length column headers a Yellow color, so they will pop/stand out when looking at Movie and various image properties. How do I go about doing this?