Automate Filename-Tag using Actions

I would like to import some folder names (2 levels to be exact) as multiple albums on movies

I just need a working Action example then I should be able to tinker with it myself from there.

Filename on Disk
i:\Multimedia\Movies\Dracula\Bloodthirsty Trilogy\Evil of Dracula (1974)\Evil of Dracula (1974).[6.5★].[1080p.x264.Bluray.2.500Kbps.23.976Fps].[1.0.AAC].[jpn].{imdb-tt0071308}.mp4

  1. Filename-Tag
    Gives this output in preview. album: Dracula Bloodthirsty Trilogy
    This is the output I would like. album: Dracula /Bloodthirsty Trilogy
    It represents 2 albums or collections and must be separated by "/", I don't know how to add the "/".

It does not appear that I can format the output with Filename-Tag and needs to do this with Actions.

I have tried to create an Action to automate this but I really just don't know how.
I created a new Action of type Format value and I can bring the %_PATH% into the album field but I don't know how to extract the values from the path. Maybe there is a simpler way.

Field: ALBUM
Format String: %_PATH%

I'd appreciate some help.

I played with this statement.
Nr 1. It is close and Nr 2. Is what i want but I dont like the hardcoding of the drive, i have many drives and the "Multimedia" and the Movies bit. I would prefer something more dynamic where I could rather extract different parent folder levels. Like when you specify ./ or ../ in Filebot. Then it is easy to extract 1, 2 or 3 levels. not having to exclude but rather extract what I need. It still seems the Action is more flexible and manageable and I can create variants for different levels.

  1. Convert "Tag-Tag"
    Field: ALBUM
    Formatstring: $replace('^'%_folderpath%,'^I:',,%_directory%,,'',' /')
    Multimedia /Movies /Dracula /Bloodthirsty Trilogy

  2. Convert "Tag-Tag"
    Field: ALBUM
    Formatstring: $replace('^'%_folderpath%,'^I:',,%_directory%,,'Multimedia',,'Movies',,'',' /')
    Dracula /Bloodthirsty Trilogy

Maybe you can reach your goal with some of this variables:

%_directory% ---> Name of the parent directory
%_parent_directory% ---> Name of the grandparent folder

And maybe this approach can help too:

This example sounds promising and more what I would like. I will have to see if i can get it to work.

I also have this one now which at least does not hardcode the Drive.

$replace(%_folderpath%,$left(%_folderpath%,3),,%_directory%,,'Multimedia\Movies',,'',' /')

Thanks for the Example just what I needed.
I will post my Level 3 Action I created, I created 3 actions for now. A level 1, Level 2 and a Level 3.
I can now easily use the Level I need.

Action #1
*Actiontype: Format Value
*Formatstring: %_FOLDERPATH%

Action #2
*Actiontype: Split fields by separator
*Separator: \

Action #3
*Actiontype: Format Value
*Field: ALBUM
*Formatstring: $meta(MY_FOLDERPATH,$sub($folderdepth(%_FOLDERPATH%),1))

Action #4
*Actiontype: Format Value
*Field: ALBUM
*Formatstring: %album% /$meta(MY_FOLDERPATH,$sub($folderdepth(%_FOLDERPATH%),2))

Action #5
*Actiontype: Format Value
*Field: ALBUM
*Formatstring: %album% /$meta(MY_FOLDERPATH,$sub($folderdepth(%_FOLDERPATH%),3))

Action #6
*Actiontype: Remove Field
*Field: ALBUM
*Fields to remove (semicolon separated): MY_FOLDERPATH

Thanks again, hope I did not make any paste errors

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