Skip to main content

Topic: Help needed with output style and filename formatting (Read 1504 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
Help needed with output style and filename formatting
Basically, I'm trying to figure out this formatting style for conversion filenaming so my music collection would be styled like this (best show this on an example):

...\Music\Pearl Jam\[1991] Ten\1.01 - Once.flac
...\Music\Pearl Jam\[1991|2009] Ten\1.01 - Once.flac

Most of it is self-explanatory, but the tricky part to do here (automatically) is the year part. For example, this album, Ten, was re-released in 2009, and if the year of release differs from the original date of release, I want that to show in the filename/directory structure.

I tag my music with the MusicBrainz Picard semi-automatic tagger, which saves the date of release in %date%, and creates a new tag named 'ORIGINALDATE' to store the original date of release. What I've come up so far (posting just the part in brackets as everything else works!):


I'm using the $left(string,4) function as Picard stores dates in the format yyyy-mm-dd and extracting the four left characters gives you the year.

So, as I said, this isn't working right now (the else statement does not execute) and if anybody could help me, thanks a lot!
  • Last Edit: 19 November, 2012, 06:17:32 PM by kidamnesiac

  • Daeron
  • [*][*][*][*][*]
Help needed with output style and filename formatting
Reply #1
Code: [Select]

'==' is not a valid function in titleformatting.
  • Last Edit: 19 November, 2012, 07:36:53 PM by Daeron

  • BenB
  • [*][*][*][*][*]
Help needed with output style and filename formatting
Reply #2
The pipe "|" is an invalid character for file and folder names. foobar interprets its presence in a string as a backslash "\" using Copy or Move in File Operations. Thus it will result in a folder named "[1991" containing a folder named "2009] Ten".

Now, as for what I'd use to accomplish what you want:
Code: [Select]

However, you might want to reconsider using this at all since it will result in multiple folders for an album when the tracks of that album have differing "originaldate" tags such as artist compilations/retrospectives.