Using Folder Names In MP3 Tag Metadata Fields

Hello Everyone,

Now that I have DO up and running again, I felt it may be a good time to ask the questions for things that I could actually test to see if they work.
After this I will go back to my posts on ideas that all users seem to can't get enough of, "share some more of your ideas" "I love your ideas" "your ideas are so great I want to have your baby".

I thought maybe a good idea to test was to try to use names of folders as metadata but I had no luck in doing so.

For Example:

         \Genre      \Artist                   \Album          \Title (song)

C:\Music\Awesome\The Village People\Greatest Hits\YMCA.mp3

or

                        \Arist
         \Genre      \Album                  \Title (song)

C:\Music\Awesome\The Village People\YMCA.mp3

A little foggy at the moment but I believe I used "SetAttr META" and I was able to get the song title to work but when it came to getting the specific folder names from the path I was not able to do so.

I tried all the different {filepath} options but it did not appear to me that there was a way to remove folders from the front of the path.
I was able to get the noroot and noterm modifiers to work correctly.
The {filepath|....} only removes from the end.

I read something about {parent} {parent2} but believe that only works with the renamer.
I also believe I read that the metadata pane does not accept expressions.

Just for piece of mind, I am correct at saying that what I was trying to accomplish cannot be done currently without some kind of script being written?
Using DO in the future I would love to be able to use it for all my metadata tagging needs without the need for a 3rd party program, just from my basic testing, it seems so close.

Naki posted the code below. It takes all currently selected file names and writes it to Comment field. It seems to work just fine with folders as well.

@sync:dopusrt /acmd SetAttr {filepath} META comment:{file|noext}

Thank you so much for your response, and thank you to Naki and also to Leo who also supplied this code at one time.

I may not have completely understood your response, I mentioned above that in the past I was able to get multiple filenames into the "title" fields which I had used the same code replacing the "comment" with "title".

@sync:dopusrt /acmd SetAttr {filepath} META title:{file|noext}

What I was wondering was if there was a way to get a folder name from the middle of a path into a specific field.

For example what if I wanted to get the folder named "THREE" from the following path, into the "album" field?

C:\FIVE\FOUR\THREE\TWO\ONE\filename.mp3

@sync:dopusrt /acmd SetAttr {filepath} META album:{  <what to put here to get this to read folder name THREE>  }

So in the metadata pane it would show Album:THREE

If I put something like {filepath|......|noroot|noterm} I believe I would get something like the following
FIVE\FOUR\THREE

I am not sure if there is any way to remove the FIVE\FOUR\ from the beginning of this file path example?

Like I said I may have misunderstood your response, if I have please let me know, but either way thank you again for responding.

Sorry, Mike. Editing that button to do what you want is way beyond me. I just had a button that I thought did what you wanted and I knew i got it from here. Maybe some other kind dopus user can help get what you want.