Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

8 Answers

up vote 18 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
2  
pyRenamer is not bad at all. – skalka Oct 31 '10 at 19:20
1  
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. – belacqua Jan 21 '11 at 22:22

Métamorphose

http://file-folder-ren.sourceforge.net/

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

thunar file manager is a GUI with a bulk rename option

http://thunar.xfce.org/pwiki/documentation/bulk_renamer

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

share|improve this answer

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.

http://www.nongnu.org/renameutils/

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

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

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
1  
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) – belacqua Jan 21 '11 at 23:07
Thanks, I have incorprated the edits – Mr Shark Jan 24 '11 at 14:29

Your Answer

 
discard

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.