Script for Automator to Remove Duplicate words from file names

Hi all,

I have created a workflow in Automator to remove duplicate words from files using “Get Specified Movies” as the input by dragging the .mov files and using the “Rename Finder Items / Find and Replace”. However, I believe there is a limit to the number of actions “Rename Finder Items” that I can add because it takes a really long time to open and stops responding upon opening.

My question is, I have 1000’s of .mov (clips) files that I would like to rename. Is there a script that I can add to my workflow to do all the heavy-lifting?

Here are some examples of my files how they are label and how Im hoping to be labeled if there is a script out there.

Before (Duplicate Name):

TOR_0023369_Tec_SPC_Tec_SPC_NIOP_1248.mov
TOR_0023369_Tec_CSP_Tec_CSP_NIOP_1268.mov
TOR_0023369_Tec_LAS_Tec_LAS_NIOP_1218.mov
TOR_0023369_Tec_ITA_Tec_ITA_NIOP_1238.mov

After (With Duplicate Name removed):

TOR_0023369_Tec_SPC_NIOP_1248.mov
TOR_0023369_Tec_CSP_NIOP_1268.mov
TOR_0023369_Tec_LAS_NIOP_1218.mov
TOR_0023369_Tec_ITA_NIOP_1238.mov

Any help will be greatly appreciated.

This looks familiar. Wasn’t it asked and answered?

Hi Mockman,

No, this is new and slightly different. I’m new to this site and couldn’t find a reply option to ask everyone that had originally replied. If anyone out there is reading this, I could really use some help. Thank you in advance!

Look forward to hearing from someone soon.