Following example of an Action Group "SplitFolderpath" demonstrates how to split the content of the Mp3tag system variable _FOLDERPATH into it's folder components and make the folder names available for scripting by owner defined tag fields.
MY_FOLDER_0 is the parent folder of the related file.
MY_FOLDER_1 is the next folder up.
MY_FOLDER_2 is the folder two steps up.
... and so on.
Begin Action Group SplitFolderpath
Action #1
Actiontype 5: Format tag field
Field: MY_FOLDERPATH
Formatstring: %_FOLDERPATH%
Action #2
Actiontype 16: Split fields by separator
Field: MY_FOLDERPATH
Separator: </b>
Action #3
Actiontype 5: Format tag field
Field: MY_FOLDER_0
Formatstring: $meta(MY_FOLDERPATH,$sub($folderdepth(%_FOLDERPATH%),0))
Action #4
Actiontype 5: Format tag field
Field: MY_FOLDER_1
Formatstring: $meta(MY_FOLDERPATH,$sub($folderdepth(%_FOLDERPATH%),1))
Action #5
Actiontype 5: Format tag field
Field: MY_FOLDER_2
Formatstring: $meta(MY_FOLDERPATH,$sub($folderdepth(%_FOLDERPATH%),2))
Action #6
Actiontype 5: Format tag field
Field: MY_FOLDER_3
Formatstring: $meta(MY_FOLDERPATH,$sub($folderdepth(%_FOLDERPATH%),3))
Action #7
Actiontype 9: Remove fields
Fields to remove (semicolon separated): MY_FOLDERPATH
End Action Group SplitFolderpath (7 Actions)
DD.20091117.1241.CET