How to delete "Original Soundtrack" from folder name?

Tags: #<Tag:0x00007f00b8582108> #<Tag:0x00007f00b8582040>

Hi! Pls, help! I have some albums with “Original Soundtrack”, “_ Original Soundtracks”, “Music from motion Picture” etc in the end in %album% so i want to remove this when i rename my folders. I can do it for each item separetly with $set and $replace, but it to long, to many variables and takes up a lot of space.
$set(_album,$replace(%album%,Original Soundtrack,))
$set(_0album,$replace(%album%,Original Soundtracks,))
$set(1album,$replace(%album%, Original Soundtrack,))
$set(2album,$replace(%album%, Original Soundtracks,))
How can i remove all this items from folder name with shorter way?

sry for my english

$set(album,$replace(%album%,Original Soundtracks,))
$set(album,$replace(%album%,Original Soundtrack,))

One line should should work for any instance in said tag.

Do the longer one first, otherwise you will end up with “Title Name Foo Bar Original Sountracks” becoming “Title Name Foo Bar s”


Thnx for the answer, grateful for your help! But now I have another problem: my script works with only one option, but if there are several, it stops working.


Solution found! Just put $if2 in $set. (But not vice versa !!!)
$if($in(%album%,: Original Soundtracks),$replace(%album%,: Original Soundtracks,),),
$if($in(%album%,:Original Soundtracks),$replace(%album%,:Original Soundtracks,),),
$if($in(%album%,: Original Soundtrack),$replace(%album%,: Original Soundtrack,),),
$if($in(%album%,:Original Soundtrack),$replace(%album%,:Original Soundtrack,),),
$if($in(%album%, Original Soundtracks),$replace(%album%, Original Soundtracks,),),
$if($in(%album%,Original Soundtracks),$replace(%album%,Original Soundtracks,),),
$if($in(%album%, Original Soundtrack),$replace(%album%, Original Soundtrack,),),
$if($in(%album%,Original Soundtrack),$replace(%album%,Original Soundtrack,),),
$if(%discsubtitle%,$if(%date%,$left(%date%,4)) $if2(%_album%,%album%)
$if(%_secondaryreleasetype%, (%_secondaryreleasetype%)))/
$if(%date%,$left(%date%,4)) $if(%discsubtitle%,%discsubtitle%,$if2(%_album%,%album%))

Thanks all for answer and thanks to my friend Max for help with this!!! )))

1 Like