I want to rename multiple files at once. For example:




I am quite familiar with the terminal, if there is no app which is quite good in renaming files.


Try something like this:

 for file in Picture*.jpg
    mv "$file" "vacation-$file"

(open terminal and add one line {press Enter} at a time.)

What that does is uses the variable file for each entry matching Picture*.jpg. Then it takes the file or folder and moves it to be prefixed with "vacation".

Hope that helps

  • 1
    What if I would like to rename Vacation-Picture4.jpg back to Picture4.jpg? Namely, removing a word from file name. Thanks! – zyy Oct 4 '18 at 3:29

No need for command line...

  1. Add all the images to be renamed into a folder.
  2. Select all files, right click mouse and select "Rename x items"
  3. Select "Add text" from first drop down menu
  4. Select "Before name" from the second drop down menu
  5. Enter "Vacation_" into the text box (without the quotation marks)
  6. Press Enter.
brew install rename

rename s/config\./route\.config\./g *

First you need homebrew installed. Then install rename, and the above regex renames all files with "config." to "route.config".

So say files config.a.js, and config.b.js -> route.config.a.js, route.config.b.js.

  • 1
    According to the brew desc rename command: "rename: Perl-powered file rename script with many helpful built-ins". The brew home rename command leads to http://plasmasturm.org/code/rename/ for documentation, etc. – kjones Jan 19 '19 at 8:41

While not a Terminal solution, I like Forklift for this purpose (and for many others). From their website:

Forklift's Multi-rename feature description

  • Yep, for sure there is a terminal based solution. I also found this on mighty google ;) manytricks.com/namemangler – YeppThat'sMe Sep 19 '12 at 20:18
  • You may as well post NameMangler as an additional answer, since this is basically a recommendation question. :) – Dan J Sep 19 '12 at 20:24
  • To rename multiple files(recursively) with Forklift .. just select all files then expend all directories by CMD+right .. till you cover them all .. its working with me – Maher Abuthraa Sep 7 '16 at 12:16

I like user933531's answer, but if you'd like a GUI, the A Better Finder Rename app is really good. I got it from the App Store.


If you want to bulk rename files I built a small script for that.

# Rename Bullk files.
# Renames all the files in PWD with the given extension.
# @param extension | jpg
# @param new_name | name
# Usage: rename jpg new_name
function rename() {
    echo "———————————————— STARTED ————————————————"

    # Counter.

    # For do loop.
    for file in *."$1"; do
        mv "$file" "$2-$COUNTER.$1"
        COUNTER=$[$COUNTER +1]
    echo "———————————————— ✔✔✔ RENAMED Every $1 file in the PWD! ✔✔✔︎ ————————————————"

Just put it in your .bashrc or .zshrc and run Usage: rename jpg new_name this will rename all jpg files in the PWD to new_name-1.jpg, new_name-2.jpg, etc.


  • Alternatively to put the function in .bashrc or .zshrc files I put it in my .bash_profile and it works great! – Elena Feb 15 '18 at 13:35

After downloading rename

brew install rename

run following command

rename -n -A Vacation- *

-A : prepend

-n : Only show how the files would be renamed.

If it looks good, run the same command without -n flags.


try this. do not need run command https://tidbits.com/2018/06/28/macos-hidden-treasures-batch-rename-items-in-the-finder/

Hope that helps

  • 1
    Answers should be more than just a link (which may break, rendering your answer useless). – nohillside Nov 2 '20 at 7:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .