If you need to rename several files at the same time, in this tutorial I will show you a couple of ways to do it.

Table of Contents

Bulk Rename (GUI)

Thunar’s Bulk Rename is the default software for this file manager used in XFCE. You can add the files with the “+” button and select the type of rename you want to perform: modify audio tags, insert date/time in the filename, insert or overwrite characters, numbering, remove characters, replace, and change to uppercase or lowercase.

Bulk Rename window

KRename (GUI)

This KDE batch file renamer. Rename process is divided in four steps: select files, define destination, select optional plugins (for reading file tags, changing file permissions, etc.), and, finally, define the rename. Click ‘Finish’ to run the renaming process. KRename could be the best bulk renaming program I tested.


Rename (Terminal)

rename from util-linux package allows basic batch renaming.

rename [options] <expression> <replacement> <files>
rename 'DSC' 'ABC' *.txt

A more complex example:

$ ls
# trimmed output
ABC_100.txt  ABC_111.txt  ABC_122.txt  ABC_133.txt  ABC_144.txt
ABC_54.txt  ABC_65.txt  ABC_76.txt  ABC_87.txt  ABC_98.txt
$ rename 'ABC_' 'ABC_0' ABC_??.txt
  • This will add a zero after “_” only if there are two digits.
$ ls
# trimmed output
ABC_050.txt  ABC_061.txt  ABC_072.txt  ABC_083.txt  ABC_094.txt
ABC_105.txt  ABC_116.txt  ABC_127.txt  ABC_138.txt  ABC_149.txt

Some interesting parameters are:

  • -n: do not make any changes, use it with -v to see what would be made.
  • -v: verbose mode.

To do recursive renaming, you can use find:

find . -name '*jpeg' | xargs -i rename -v 'jpeg' 'jpg' {}