Mass Remove File Prefix on a Mac?

Solution 1:

The easiest solution might be to use the commercial A Better Finder Rename to achieve this.

For a free alternative, you can install the command-line rename utility:

  • install Xcode
  • install Homebrew
  • open Terminal.app and do brew install rename

You can now use, in the Terminal, either of:

rename -d img_ *
rename "s/^img_//" *

to strip away the prefix.

Solution 2:

You can use Automator's Rename Finder Items action:

  1. Start Automator, select Workflow, and add Get Specified Finder Items and Rename Finder Items from the library on the left to the workflow area on the right by double-clicking.

  2. Drag and drop the files you want to rename to the list in Get Specified Finder Items.

  3. Change Rename Finder Items to Replace Text as desired, and click the Run button.

Automator screenshot

Result after execution: Result

You can easily change this workflow to make it repeatable, e.g. with selected Finder items instead, and save it as Application or Service.