Mac – How to rename multiple files at once

macrenameterminal

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

Picture1.jpg
Picture2.jpg
Picture3.jpg
Picture4.jpg

into

Vacation-Picture1.jpg
Vacation-Picture2.jpg
Vacation-Picture3.jpg
Vacation-Picture4.jpg

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

Best Answer

Try something like this:

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

(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