How to bulk-rename files with invalid encoding or bulk-replace invalid encoded characters?
- by qdoe
I have a debian server and I'm hosting music for an internet radio station. I have trouble with file names and paths because a lot of files got an invalid encoding, for example:
./music/Bändname - Some Title - additional Info/B?ndname - 07 - This Title Is Cörtain, The EncÃ?ding Not.mp3
Ideally, I would like to remove everything that is not letters A-Z/a-z or numbers 0-9 or dash -/underscore _... The result should look like something like that:
./music/Bndname-SomeTitle-additionalInfo/Bndname-07-ThisTitleIsCrtain,TheEnc?dingNot.mp3
How to achieve this for a batch of a lot of files and directories?
I've seen this similar question: bulk rename (or correctly display) files with special characters
But this only fixes the encoding, I would prefer a more strict approach as described above.