This project has moved and is read-only. For the latest updates, please go here.

Emdash used in filename?

Topics: question
Nov 13, 2012 at 8:43 PM

It appears that MetaRenamer is inserting emdashes as a delimiter in the file name even though I clearly have regular dashes in the format string. Is there any way to change this? It is very difficult to process these with anything else since most utilities don't support unicode characters properly.

<episode_name_format>{0} - S{1}E{2} - {3}</episode_name_format>

Nov 15, 2012 at 8:29 AM

I don't think the script itself is doing this. If the <episode_name_format> tag is missing from the configuration file, the code has a default that most definitely does not use emdashes:

function GetEpisodeNameFormat()
   # Define the default result
   $result = "{0} - S{1}E{2} - {3}"
   try {
      # Only override the default value if a value has actually been provided!
      if ($my_config.config.episode_name_format -ne "")
         { $result = $my_config.config.episode_name_format }
   catch {
      Write-Verbose "... error while retrieving episode_name_format element: $($_.Exception.Message)"
   Write-Output $result

It may be that you have copied/pasted the configuration out of the documentation. If you have, that may be the cause. I wrote the documentation in Word, which does tend to convert regular dashes to emdashes.

If you aren't sure, I suggest completely removing the episode_name_format line from the config file and seeing what the script does then.