Sign up ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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

5 Answers 5

up vote 9 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

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

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
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

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.