# Finding a specific word in a directory name and then write something to a tag field

**URL:** https://community.mp3tag.de/t/finding-a-specific-word-in-a-directory-name-and-then-write-something-to-a-tag-field/63862
**Category:** Support
**Created:** [February 23, 2024, 4:49am UTC](https://community.mp3tag.de/t/finding-a-specific-word-in-a-directory-name-and-then-write-something-to-a-tag-field/63862 "2024-02-23T04:49:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![climaxim](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/d2c977/32.png) [@climaxim](https://community.mp3tag.de/u/climaxim)
#### Post date: [February 23, 2024, 4:49am UTC](https://community.mp3tag.de/t/finding-a-specific-word-in-a-directory-name-and-then-write-something-to-a-tag-field/63862/1 "2024-02-23T04:49:15Z")

</div>

Hello guys/gals!

My question is that I have a lot of folders named randomly.

e.g.  
Amon Tobin - Like Regular Chickens (Remixes) - ZEN1268 - (1998-WEB-FLAC)  
Lemon D - Feel It [OC7] [1995] [WEB\_FLAC]  
Afterdark - Afterdark Collection [WEB][FLAC][1991]  
etc. etc.

So basically what I want to do is that if the %\_directory% contains "WEB" (cannot specify where, it can be random) then write "WEB" to the "mediatype" tag field. Is this possible?

Thanks in advance! This program is a masterpiece.

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [February 23, 2024, 5:48am UTC](https://community.mp3tag.de/t/finding-a-specific-word-in-a-directory-name-and-then-write-something-to-a-tag-field/63862/2 "2024-02-23T05:48:18Z")

</div>

Load all your files.  
Filter for `%_directory% MATCHES (?-i)WEB`  
This shows all your files that have capitalized WEB in your directorys.  
Mark all filtered files and write WEB to mediatype.

The filter only shows reliable results if you don't have WEB capitalized in other parts of the directory name, e.g. in the name of an artist or an album.

---

<div class="post-metadata">

### Author: ![climaxim](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/d2c977/32.png) [@climaxim](https://community.mp3tag.de/u/climaxim)
#### Post date: [February 23, 2024, 7:25am UTC](https://community.mp3tag.de/t/finding-a-specific-word-in-a-directory-name-and-then-write-something-to-a-tag-field/63862/3 "2024-02-23T07:25:26Z")

</div>

Thank you very much! It works! 🙂

---

<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: [March 24, 2024, 7:26am UTC](https://community.mp3tag.de/t/finding-a-specific-word-in-a-directory-name-and-then-write-something-to-a-tag-field/63862/4 "2024-03-24T07:26:06Z")

</div>

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