Set Genre to root folder name

Sorry for being a newbie. And I did try to find a solution in the forum, but I did not succeed.

Here's my (simple) problem:

My music folder structure is like

s:\acoustic guitar\artist1\album1
s:\acoustic guitar\artist1\album2
s:\pop\artist2\album1
s:\pop\artist3\album1\disc1
s:\pop\artist3\album1\disc2

etc

Now I want to assign the root folder name to the Genre tag. So "acoustic guitar" and "pop" in this example. I already have the full path assigned to the Genre tag. I probably have to use expressions to strip "s:" from the Genre string and all the characters past the second "". But how do I do that?

Really appreciate MP3TAG, very powerfull...

There are several methods to reach the goal ...
by using the Mp3tag scripting language ...
here is one proposal from the bag of tricks ...

Apply a group of two actions ...

Action 1: Format value Field: GENRE Formatstring: $replace(%_path%,'\','\\\\') Action 2: Format value Field: GENRE Formatstring: $meta(GENRE,1)

... or ...
apply one action ...

Action 1: Format value Field: GENRE Formatstring: $regexp(%_path%,'^.+?\\\\(.+?)\\\\.*$','$1')

... or ...
apply one action ...

Action 1: Format value Field: GENRE Formatstring: $left($cutLeft(%_path%,$strchr(%_path%,'\')),$sub($strchr($cutLeft(%_path%,$strchr(%_path%,'\')),'\'),1))

... or ...
apply a group of four actions ...

Action 1: Format value Field: GENRE Formatstring: %_path% Action 2: Format value Field: GENRE Formatstring: $cutLeft(%GENRE%,$strchr(%GENRE%,'\')) Action 3: Format value Field: GENRE Formatstring: $left(%GENRE%,$strchr(%GENRE%,'\')) Action 4: Format value Field: GENRE Formatstring: $trimRight(%GENRE%,'\')

DD.20150507.1852.CEST, DD.20150507.2002.CEST

Perhaps you assign the genre part of the filename again and leave out the stripping.
Use the function Convert>Filename-Tag
Format string: %genre%\%dummy%\%dummy%

Great! The very first offered option already works perfect for me. Thanks for taking the time! I also like the alternatives, gives some insight in how this all works.