# Filter by path name

**URL:** https://community.mp3tag.de/t/filter-by-path-name/61138
**Category:** Mac
**Created:** [May 31, 2023, 8:46pm UTC](https://community.mp3tag.de/t/filter-by-path-name/61138 "2023-05-31T20:46:59Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![djquartz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/djquartz/32/12233_2.png) [@djquartz](https://community.mp3tag.de/u/djquartz)
#### Post date: [May 31, 2023, 8:46pm UTC](https://community.mp3tag.de/t/filter-by-path-name/61138/1 "2023-05-31T20:46:59Z")

</div>

I was trying to figure out how to filter things by path name. Need some assistance.

I want to filter by this path /Volumes/Scratch Live/scratchlive\_songs/Singles/

Is this possible?

---

<div class="post-metadata">

### Author: ![djquartz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/djquartz/32/12233_2.png) [@djquartz](https://community.mp3tag.de/u/djquartz)
#### Post date: [May 31, 2023, 10:45pm UTC](https://community.mp3tag.de/t/filter-by-path-name/61138/2 "2023-05-31T22:45:16Z")

</div>

Update:

I tried %\_path% EQUAL "/Volumes/Scratch Live/scratchlive\_songs/Singles/"

It almost works correctly, I did see all the songs with this path but it shows two others which is not making sense.

/Volumes/Scratch Live/scratchlive\_songs/Singles/Promo/  
/Volumes/Scratch Live/scratchlive\_songs/Singles/Spinstatz/

I'm not sure why it's not filtering out these ones but filtered out others. I noticed it filtered out tracks that matched corrected folder path as well.

So I tried, %\_path% MATCHES "/Volumes/Scratch Live/scratchlive\_songs/Singles/"

This shows everything so it's not filtering based on the exact path name.

What am I missing?

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [June 1, 2023, 12:50am UTC](https://community.mp3tag.de/t/filter-by-path-name/61138/3 "2023-06-01T00:50:45Z")

</div>

Try using the term HAS in your filter.  
%\_path% HAS "/Volumes/Scratch Live/scratchlive\_songs/Singles/"

---

<div class="post-metadata">

### Author: ![djquartz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/djquartz/32/12233_2.png) [@djquartz](https://community.mp3tag.de/u/djquartz)
#### Post date: [June 1, 2023, 2:04am UTC](https://community.mp3tag.de/t/filter-by-path-name/61138/4 "2023-06-01T02:04:01Z")

</div>

Thanks Motely, but HAS showed more non-matching tracks than EQUAL did.

It's just weird that EQUAL doesn't show only the tracks matching that path above.

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [June 1, 2023, 3:33am UTC](https://community.mp3tag.de/t/filter-by-path-name/61138/5 "2023-06-01T03:33:28Z")

</div>

Sorry, after reading your previous posts more carefully, I now see you want to get just this folder. Instead of HAS you can use IS to have it match exactly.

But in this case, I don’t think anything will change. The filter still grabs all files that are in this folder, and that includes those additional sub folders. You may need to get creative and add an additional filter term to exclude files from those sub folders.

---

<div class="post-metadata">

### Author: ![djquartz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/djquartz/32/12233_2.png) [@djquartz](https://community.mp3tag.de/u/djquartz)
#### Post date: [June 1, 2023, 4:53am UTC](https://community.mp3tag.de/t/filter-by-path-name/61138/6 "2023-06-01T04:53:14Z")

</div>

The IS condition doesn't work at all for me. That's why I didn't go any further with it.

It's strange how EQUAL wouldn't just take that path in the string and filter anything that is not equal to that exact path.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [June 1, 2023, 5:17am UTC](https://community.mp3tag.de/t/filter-by-path-name/61138/7 "2023-06-01T05:17:06Z")

</div>

A look at the documentation reveals that EQUAL compares numbers.

> [@Filtering and Searching Files and Tags](https://community.mp3tag.de/t/filtering-and-searching-files-and-tags/53271#field-equal-number-11):
>
> The Filter field in Mp3tag's toolbar allows for searching files that meet a certain criteria (e.g., the filename contains specific characters or a tag field has a specific content). To filter the file list simply start typing in the filter field. As a result, all files that contain the specified filter string in their tag or filename are listed in the file list. Sometimes it is necessary to use more complex criteria to search for files (e.g., all files of a specific genre but not of that arti…

A path is not a number.  
If the operator EQUAL expects a numeric expression in front and behind it then your filter evalutes to  
`0 EQUAL 0`  
as both strings are not numeric and therefore have the numeric value of 0.

Perhaps a filter for the \_DIRECTORY gives better results.

---

<div class="post-metadata">

### Author: ![djquartz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/djquartz/32/12233_2.png) [@djquartz](https://community.mp3tag.de/u/djquartz)
#### Post date: [June 1, 2023, 5:21am UTC](https://community.mp3tag.de/t/filter-by-path-name/61138/8 "2023-06-01T05:21:18Z")

</div>

I was looking at that but here's the funny thing. The directory field did not the yield good results either.

The path field with the equal condition yielded the best results which is strange.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [June 1, 2023, 5:24am UTC](https://community.mp3tag.de/t/filter-by-path-name/61138/9 "2023-06-01T05:24:35Z")

</div>

Could you show us an example of a path that you do not want to appear?  
Sreenshots are usually really helpful in such cases.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [June 1, 2023, 6:08am UTC](https://community.mp3tag.de/t/filter-by-path-name/61138/10 "2023-06-01T06:08:58Z")

</div>

> [@djquartz](#):
>
> I want to filter by this path /Volumes/Scratch Live/scratchlive\_songs/Singles/

This should do the trick:

`%_folderpath% IS "/Volumes/Scratch Live/scratchlive_songs/Singles/"`

---

<div class="post-metadata">

### Author: ![djquartz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/djquartz/32/12233_2.png) [@djquartz](https://community.mp3tag.de/u/djquartz)
#### Post date: [June 1, 2023, 1:32pm UTC](https://community.mp3tag.de/t/filter-by-path-name/61138/11 "2023-06-01T13:32:49Z")

</div>

Thanks Florian, this syntax worked.

I'm using this as a workaround for filtering out recursive folder listing.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [July 10, 2023, 2:34pm UTC](https://community.mp3tag.de/t/filter-by-path-name/61138/12 "2023-07-10T14:34:33Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
