I have thousands of really old video files that have brackets of all types strewn in them in no particular order. I'm trying to "clean" them, that is, rename these files so that all the brackets and the strings in them are eliminated, effectively replaced by an empty string. An example would be something like
{xyz}<abc>actual_title[prev_suffix](suffix)some_other_text.mp4
The brackets are used correctly, that is, there are no filenames like {xyz<}abc>, though they can be nested brackets. There are no files that are named entirely in brackets; there is always a section that is un-bracketed. It is also possible that once all the brackets are removed two files will have the exact same name, in which case I don't really care how they are differentiated.
The result I'd like would be
actual_titlesome_other_text.mp4
Naively this is easy to do by doing multiple passes on the filename, one pass for each bracket pair, but is it possible to do this quicker, possibly by constructing a regex?