The tag to filename engine is a template driven engine used at several places in Helium:

  • The Rename Files tool
  • Scripting
  • Definition of user-columns

The engine can tag in-data arguments from a specific database entry or an physical audio file and from that genrate an aggregated result string based on existing properties and rules.

Lesson 1 (the basics)
Say you want your filenames to look something like this:
David Bowie – Lazarus.mp3
Easy. Just type in this template and hit Go (or “Rename files” as the button is really named):
{{artist}} - {{title}}
What’s that around the artist and title names you ask? Curly brackets of course. Why do we need to use two opening and two closing all the time you ask? You’ll see.

Lesson 2 (prefixes and suffixes)
Say you want to include a little more information in the names such as a “Remix” field and a “Subtitle” field. Easy, you say. Looks like this:
{{artist}} - {{title}} ({{subtitle}}) [{{remix}}]

Of course. But what about files that don’t have any subtitle or remix tags set? That would end up with something like this:
David Bowie – Lazarus () [].mp3
You don’t want that. This is where the concept of prefix and suffix comes in. Prefix is something that is included before a field and suffix is included after the field. Look at this template:
{{artist}} - {{title}}{ ({subtitle})}{ [{remix}]}

As you can see we have included a prefix and suffix in between the curly brackets. This will make the field disappear entirely (including the prefix and suffix) from the file name if the field is empty in tags.
As you see you can use a combination of literal text (like the ” – ” between artist and title) and prefix/suffix. Literals work fine as long as you are sure that the fields before and after will always contain something. Use what fit your needs.

Lesson 3 (folders)
Creating folders based on tag information is important to any serious music collector. You can enter folders into your templates by adding backslashes to specify new folders. If you would want to move songs into artists’ folders like this:
David Bowie\Lazarus.mp3
You type in a template like this:
{{artist}}\{{title}}

Note that this would create an artist folder wherever the file was previously located which may not be what you expect. To tell Neon exactly where you would like your files to end up you will need to explicitly include the path in your template, like this:
C:\My music\{{artist}}\{{title}}

Lesson 4 (numbers)
Numbers can be included just as any other field in a template. Just wrap the field between two curly brackets as usual:
{{track}}. {{title}}

which produces this file name:
3. Lazarus.mp3
Sometimes you might want to pad numbers with leading zeros, perhaps to make them line up neat in the lists. Would that be hard? You know it won’t. Example ahead:
{{track(2)}}. {{title}}

Insert round brackets after the field name and enter the number of numbers (no pun intended) you want your filenames to have. The above template would produce:
03. Lazarus.mp3
While
{{track(5)}}. {{title}}

would produce
00003. Lazarus.mp3

Lesson 5 (limit lengths)
If you want to limit the length of some fields you can do this in a similar fashion to how number padding works. Say you would want to create a file structure like this:
C:\My music\D\David Bowie\Blackstar\03. Lazarus.mp3
Your template would look like this:
C:\My music\{{artist(1)}}\{{artist}}\{{album}}\{{track(2)}}. {{title}}

As you see you include a limitor between round brackets. The 1 says that the artist field should be limited to a maximum of one character.
Lesson 6 (replacement for empty tags)
As mentioned earlier, an empty field will always be stripped from the filename along with the prefix and suffix. Sometimes you want this but sometimes you would want to include a placeholder to keep consistency in file names or folders. Consider the following file structure:
C:\My music\Album\2016\David Bowie – Blackstar\3. Lazarus.mp3
The following template would work as long as the “Release type” field contains some information:
C:\My music\{{releasetype}}\{{releaseyear}}\{{artist}} - {{album}}\{{track}}. {{title}}

But what if you run across a couple of files that does not have any value in the “Release type” field? These files would end up here:
C:\My music\2015\Basement Jaxx – Awesomeness (Bootleg)\5. Best. Song. Ever.mp3
See the missing release type folder? This can be solved using this syntax:
{{field|Replacement text}}

i.e. a pipe character after the field name followed by the text that should replace an empty field. The following template would fix the issue with folders ending up in the wrong place:
C:\My music\{{releasetype|Unknown}}\{{releaseyear}}\{{artist}} - {{album}}\{{track}}. {{title}}

Which would place the Basement Jaxx tune from above in this folder instead:
C:\My music\Unknown\2015\Basement Jaxx – Awesomeness (Bootleg)\5. Best. Song. Ever.mp3

Complete list of fields
Below is a list of all supported fields:
  • {{bitrate}} 
  • {{encodingtype}} 
  • {{frequency}} 
  • {{album}} 
  • {{albumartist}} 
  • {{artist-so}} 
  • {{album-so}} 
  • {{albumsubtitle}}
  • {{albumversion}} 
  • {{artist}} 
  • {{artist-so}} 
  • {{bandorchestra}} 
  • {{bpm}} 
  • {{comment}} 
  • {{composer}} 
  • {{conductor}} 
  • {{copyright}} 
  • {{cd}} 
  • {{track}} 
  • {{custom1}} 
  • {{custom2}} 
  • {{custom3}} 
  • {{custom4}} 
  • {{custom5}} 
  • {{custom6}} 
  • {{custom7}} 
  • {{custom8}} 
  • {{custom9}} 
  • {{custom10}} 
  • {{encodedby}} 
  • {{genre}} 
  • {{initialkey}} 
  • {{isrc}} 
  • {{label}} 
  • {{language}} 
  • {{lyricist}} 
  • {{media}} 
  • {{mood}} 
  • {{originalartist}} 
  • {{originallyricist}} 
  • {{originaltitle}} 
  • {{preference}} 
  • {{produced}} 
  • {{rating}} 
  • {{recordingyear}} 
  • {{releaseyear}} 
  • {{remix}} 
  • {{situation}} 
  • {{softwaresettings}} 
  • {{subtitle}} 
  • {{tempo}} 
  • {{title}} 
  • {{title-so}} 
  • {{totalcds}} 
  • {{totaltracks}}