Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 10 down vote accepted

Try something like

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

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

share|improve this answer
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.

share|improve this answer

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

Forklift's Multi-rename feature description

share|improve this answer
Yep, for sure there is a terminal based solution. I also found this on mighty google ;) – 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
Forklift doesnt support recursive renaming ! – Maher Abuthraa Jun 14 at 12:27

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.

share|improve this answer

If you prefer a more flexible solution and are able to work with regular expressions this little perl script is very helpful:

# rename - Larry's filename fixer
# Usage: rename perlexpr [files]

($op = shift) || die "Usage: rename perlexpr [filenames]\n";

chomp(@ARGV = <STDIN>) unless @ARGV;

for (@ARGV) {
    $was = $_;
    eval $op;
    die $@ if $@;
    rename($was,$_) unless $was eq $_;
share|improve this answer
Interesting but not clear how it works. Can you give an example or two? – geotheory Aug 15 '13 at 12:45

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.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.