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.

link|improve this question

feedback

8 Answers

up vote 9 down vote accepted

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

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

link|improve this answer
1  
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. – belacqua Jan 21 '11 at 22:22
feedback

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

link|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
@fred.bear -- Just curious -- what is a use example for the kind of regex you need? I have also used cli/shell loops/sed/awk for weird renaming issues, but they tend to be rare for me. – belacqua Jan 21 '11 at 22:40
@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
@fred.bear -- Cool. It does look like Métamorphose (mentioned by perseo22) does regex, but I haven't tried it myself. – belacqua Jan 24 '11 at 20:13
feedback

Métamorphose

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

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

link|improve this answer
feedback

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

link|improve this answer
feedback

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/

link|improve this answer
feedback

I tend to use mmv, which is commandlinebased, somewhat quirky expression syntax but tend to solve most of my problems.

link|improve this answer
feedback

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

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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