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

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.

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.

Thank you very much! It works! :slight_smile: