How can I batch rename files in multiple folders?
Asked by
CuriousCat42
I have a large collection of research PDFs that I've downloaded, and many of these files have long, unwieldy names. For example, one of the file names is "Ugarit-Forschungen -- Unknown -- Mรผnster, Germany, 1969 -- Mรผnster, Ugarit-Verlag -- 1468917 -- 8682342c4e87c46b2053df7bb8d232a6 -- Anna's Archive.pdf." I'm using the latest version of Kubuntu LTS, and I want to rename these files in bulk without doing it manually. Is there a straightforward way to do this? I would appreciate any tips or scripts that could help!
Answers
You can definitely use bash scripting for this! If you're familiar with commands like find, mv, and awk, you can set up a script to rename the files in bulk. It might take a bit of time to set up, but itโll save you a headache in the long run!
Reply to this answer
I haven't used it for this exact scenario, but I've had good luck with KDE's krename. It's pretty flexible and allows for a variety of renaming patterns. It might be worth checking out!
Reply to this answer
For batch renaming, writing a Python script works great! It allows for a lot of customization, so you can specify exactly how you want the files renamedโlike using the book's title instead! Let me know what you need, and I can help you set it up.
Reply to this answer
Add your answer
Answers are reviewed before publication.
CuriousCat42: That sounds promising! I am definitely looking to get the book titles in the filenames. Any examples or guidance you can share?