Assuming all but the number is the same in all file names, try this in a folder with a test file first....
rename 's/_track\d*_\[spa\]//' *
Welcome to c/linux!
Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!
Rules:
Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.
Be respectful: Treat fellow community members with respect and courtesy.
Quality over quantity: Share informative and thought-provoking content.
No spam or self-promotion: Avoid excessive self-promotion or spamming.
No NSFW adult content
Follow general lemmy guidelines.
Assuming all but the number is the same in all file names, try this in a folder with a test file first....
rename 's/_track\d*_\[spa\]//' *
Thank you! I noodled around with that in a GUI program called GPRename and found a workable solution I just had to modify yours a bit to make it work there. Here's the finished solution, at least when using a graphical program like GPRename: _track\d*_\[eng\] *
Try asking chatgpt to write such bash script. Of you are not good at bash - ask to tell how to execute it too.
This is something I'd probably do with a shell script. You can do it in a few intermediate stages. I'd start with putting together a script to dump the filenames to a text file and then some sed and awk to process that down to the final names. You could basically write a script to generate a script that you could inspect to see if it was correct before running it.