Renaming files to remove parenthesized strings

filesrename

I have a collection of files with names like these:

Ace of Aces (Europe).mp4
Action Fighter (USA, Europe) (v1.2).mp4
Addams Family, The (Europe).mp4
Aerial Assault (USA).mp4
After Burner (World).mp4
Air Rescue (Europe).mp4
Aladdin (Europe).mp4
Alex Kidd - High-Tech World (USA, Europe).mp4
Alex Kidd in Miracle World (USA, Europe) (v1.1).mp4
Alex Kidd in Shinobi World (USA, Europe).mp4
Alex Kidd - The Lost Stars (World).mp4
Alf (USA).mp4
Alien 3 (Europe).mp4
Alien Storm (Europe).mp4
Alien Syndrome (USA, Europe).mp4
Altered Beast (USA, Europe).mp4
American Baseball (Europe).mp4
American Pro Football (Europe).mp4
Andre Agassi Tennis (Europe).mp4
Arcade Smash Hits (Europe).mp4
Assault City (Europe) (Light Phaser).mp4

(I have these filenames listed in a text file.) 

I have to get away from parentheses, so I would like to rename the files
to remove the parentheses and the text between them,
so the filenames will be as follows:

Ace of Aces.mp4
Action Fighter.mp4
Addams Family, The.mp4
Aerial Assaul.mp4
After Burner.mp4
Air Rescue.mp4
Aladdi.mp4
Alex Kidd - High-Tech World.mp4
Alex Kidd in Miracle World.mp4
Alex Kidd in Shinobi World.mp4
Alex Kidd - The Lost Stars.mp4
Alf.mp4
Alien 3.mp4
Alien Storm.mp4
Alien Syndrome.mp4
Altered Beast.mp4
American Baseball.mp4
American Pro Footbal.mp4
Andre Agassi Tennis.mp4
Arcade Smash Hits.mp4
Assault City.mp4

Ideally, any solution should alert me if I have, for example, files like
Aladdin (Europe).mp4 and Aladdin (Asia).mp4
or Ghostbusters (1984).mp4 and Ghostbusters (2016).mp4,
and not destroy any files.

Best Answer

Use this :

rename 's/\s*\([^\)]+\)//g' *.mp4

Should be the perl's rename command, if it's not this one, you can download it with no dependencies from cpan.org

Related Question