Mass rename on Synology

Published: 2013-07-27
Sorting through my digital "archives" (*cough*)... A while ago, I showed you how to mass encode audio files from FLAC to MP3 using only the default tools available on a Synology box.

Now, I've got another problem: a large collection of files with weird characters in the filename, showing up as '?' in the Synology GUI... and as plain crap on a MacOS SMB mount (e.g 6KE7HSG.pdf) . Some character encoding issue, I suppose.

So, how do you rename hundreds of files in one ago, filtering crappy and/or unwanted characters in the process? In this case, I'd like to rename [Squadron-Signal] Aircraft in Action n?032 - F-14 Tomcat.pdf (yeah, I'm an aircraft buff, sue me) into n032 - F-14 Tomcat.pdf

On Linux, I'd just use rename(1), but it's not installed on my Synology box, so let's ssh and do it the old way. This should be easy to adapt to your own needs.



sh and sed: what else?

About the Author

Julien Simon is the Chief Evangelist at Arcee AI , specializing in Small Language Models and enterprise AI solutions. Recognized as the #1 AI Evangelist globally by AI Magazine in 2021, he brings over 30 years of technology leadership experience to his role.

With 650+ speaking engagements worldwide and 350+ technical blog posts, Julien is a leading voice in practical AI implementation, cost-effective AI solutions, and the democratization of artificial intelligence. His expertise spans open-source AI, Small Language Models, enterprise AI strategy, and edge computing optimization.

Previously serving as Principal Evangelist at Amazon Web Services and Chief Evangelist at Hugging Face, Julien has helped thousands of organizations implement AI solutions that deliver real business value. He is the author of "Learn Amazon SageMaker," the first book ever published on AWS's flagship machine learning service.

Julien's mission is to make AI accessible, understandable, and controllable for enterprises through transparent, open-weights models that organizations can deploy, customize, and trust.