I had once made a program which did something of that kind - it renamed all .txt files in the directory to .cpp

I used findfirst()/findnext functions along with rename(). i dont know wether it is std or supported by CW.

What you have to do is just check if the filename contains a bracket and then rename it to your liking.