Author Topic: expanding the Filename Char Mapping list  (Read 278 times)

Orin

  • Newbie
  • *
  • Posts: 2
Recently, I've embarked on a mission to reorganize my files to enhance compatibility across various file systems and improve searchability. A significant part of this process involves cleaning up the numerous diacritic marks in my filenames— which hinders usability for many users without accented keyboards, unicode skills, patience, or (let's be honest) knowledge of languages besides English. It's a tradeoff, but simply swapping "ñ" with "n", or "ž" with "z is plain good enough.

But... this seems to be harder than it should be. Maybe there's a clever workflow I've missed. Using nested $Replace( $Replace( $Replace( $Replace( $Replace( functions is highly impractical with the number of diacritic substitutions which would need to be performed.

However, there is an ideal solution almost: the Filename Char Mapping feature of the File Reorganizer itself. It currently only allows 2 user-editable replacement characters ( every "with:" field is custom; the "replace:" fields appear *mostly* unchangeable). Which actually works! To an extent! It becomes tedious to swap out all the different  ß -> ss, ž - > z, ç - >c, et cetera.  But the solution falls short when a file has more than two non-ASCII characters (counting capitals).

Adding more replacement pairs, say a dozen or even a hundred, would be massively helpful. Alternatively, allowing an arbitrary number of user-editable fields could provide even more flexibility. I've no idea which solution would be better. But being able to define all character replacements at once would certainly streamline this task and make it more user-friendly. Here on the forums, I've spotted requests to alter the $Replace and $RxReplace functions to support multiple replacements in a single call,  but my intuition says that embiggening the Filename Char Mapping feature might be much simpler.

boroda

  • Hero Member
  • *****
  • Posts: 4748
you can try this plugin for transliteration. use plugin function $TransliterateToAscii() for file naming template in file organizer.

Zak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2497
However, there is an ideal solution almost: the Filename Char Mapping feature of the File Reorganizer itself.
I see your point, but the Filename Char Mapping is to handle characters that Windows doesn't allow in file names, not to perform mass replacements.

every "with:" field is custom; the "replace:" fields appear *mostly* unchangeable
Each field only allows a single character replacement and that most of them already have a space as the default replacement character. So you can't set a new replacement character without first deleting the (non-visible) space that is already there.

The plug-in Boroda linked to looks promising.
It would also be a trivial task in mp3tag.
Bee excellent to each other...