Take the 2-minute tour ×

I need to rename a bunch of files in order to fix their sort order, therefore I need to be able to do a sort of "find and replace" so I can replace chunks of the filenames at a time.

What tools should I use? I prefer GUI but a command line tool recommendation would also be fine.

share|improve this question

12 Answers 12

up vote 34 down vote accepted

There are a few but I recommend gprename Install gprename which is a good compromise between usability and functionality.

Other tools are: rename, krename Install krename , pyrenamer Install pyrenamer , cuteRenamer, ...

share|improve this answer
pyRenamer is not bad at all. –  skalka Oct 31 '10 at 19:20
I have use pyrenamer often and sometimes gprename unless the change is very easily done on the command line. The best thing about these GUI's is the built-in 'preview' action. This will save you headaches. –  belacq Jan 21 '11 at 22:22
+1 for gprename, just tried and done the needed rename in 5 seconds –  Pisu Nov 8 '13 at 6:28
Shame neither gprename or pyrename can take list of files to rename from the command line –  artfulrobot May 17 at 9:48



may be a little difficult to handle, but really powerful!

share|improve this answer

http://tips.webdesign10.com/how-to-bulk-rename-files-in-linux-in-the-terminal might help you. But it uses the command line.

share|improve this answer
Thanks, I really like "rename"... I realize it doesn't suit everyone, but the good thing about the command line (for me) is that it is typically consistant, and more powerful... I tried the mentioned GUIs, but..."Oh no! Not another quirky interface to grapple with!" ,,, and none of them used "standard" Regular-Expressions; this one does.... but if I find a GUI renamer with full-blown regex capability, and can be launched from the file-browser, I'll probably use it (as well as "rename"). –  Peter.O Nov 1 '10 at 4:35
@jgbelacqua:.. I've re-arranged the names of more groups of audio/video/pics than I care to think about.. I did much of it in Windows with a literal-text renamer, but if I had a regex renamer at the time it would have saved a lot of "nuisance" time, and any time spent familiarizing one's self with regex is time well spent... I am endlessly amazed at the flexibility of Regular Expressions. (perhaps it is only because of mass renamers that I even bother to rename them...but I do, and regex makes it easier.. :) –  Peter.O Jan 24 '11 at 19:37

I really like qmv from the renameutils package. It enables you to use your favorite (terminal based) text editor to rename files. I prefer to invoke it with -f do which gives you a single column (one row per file) with filenames. Combined with the power of Vim it gives you all the tools you need to do massive filename editing.


share|improve this answer

thunar file manager is a GUI with a bulk rename option


it's not standard on Gnome but can be installed through the software centre

share|improve this answer

If you like the shell and perl regular expressions I'd recommend rename. It's as plain as it's name.

share|improve this answer

If you are familiar with Emacs, I think nothing beats Dired for this task. Even if you don't use Emacs that often you may find Dired a handy tool.

sudo aptitude install emacs23-nox

Start Emacs Dired mode for a directory:

emacs -nw path/to/dir/

Now enter edit directory mode:

C-x C-q (that is Ctrl+x followed by Ctrl+q)

You can now edit the filenames like editing text in every plain text editor. You may even chose to replace the filenames using regular expressions.

When finished, type:

C-c C-c (that is Ctrl+c followed by Ctrl+c)

Or alternatively press the following sequence to abort your changes:

C-c Esc (that is Ctrl+c followed by Esc)

share|improve this answer

On the command line theres also the possibility to use magic of sed and shell:

ls *.c | sed "s#\(.*\)\.c#mv \0 \1.cpp#" | sh
share|improve this answer
That doesn't seem to work as printed. You might also use '#' or other character instead of "\" as separators in examples for possibly more clarity. e.g., ` ls .c | sed 's#([a-z])\.c#\1.cpp#' ` (This example is not do the rename, just to display the new filename, for simplicity) –  belacq Jan 21 '11 at 23:07
Thanks, I have incorprated the edits –  Mr Shark Jan 24 '11 at 14:29
+1 I find it a really nice way (that additionally works across all distros), without installing anything. But I would probably use the -d switch for ls to avoid listing content of directories which might also end with .c (most of the times not an issue, but still ..). –  Levit Nov 3 at 8:42

I tend to use mmv, which is command-line based, and has a somewhat quirky expression syntax but tend to solve most of my problems.

share|improve this answer

If you use Nautilus and know how Nautilus Scripts work, you could use nautilus-renamer.

share|improve this answer

Windows has a really good program for this called Bulk Rename Utility. Here is the URL: http://www.bulkrenameutility.co.uk/Main_Intro.php.

There is a unicode Windows 98 version that is portable. I put that in a folder on my Linux system (Mint Maya) and when I run it through Wine it works like a charm. The gui is very easy to use and very flexible.

share|improve this answer

For me the pyRenamer worked the best. Nothing (sadly) comes close to Total Commanders built it renaming tool. pyRenamer doesn't integrate with Krusader but considering the fact, that you don't use the renaming tools that often anyway, pyRenamer is a very good option.

share|improve this answer

Your Answer


