Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Sunday, April 5, 2015 at 16:41

Sometimes, you will need to rename many files at once. It is difficult to do it one by one. Then you need batch rename. There are many tools to do it in Linux. But if you like GUI, you can choose KRename. I will show you how to use it by example.

Batch Renaming Made Easy

Install KRename



You can choose whether install it by Terminal or by GUI. By apt-get command in Terminal:

sudo apt-get install krename

By GUI, you can use Ubuntu Software Center.



Suffix Renaming



  1. Prepare the files to be renamed. I prepare here six PNG files. I want to add ubuntubuzz.com text in every file name.
  2. Open KRename. 
  3. You are now in tab 1, Files. Open the six files into KRename by Open button or by dragging the files into KRename window. Go to tab 2.
    Tab 1
  4. You are now in tab 2, Destination. Select Rename input files here. Go to tab 4. Ignore tab 3.
    Tab 2
  5. You are now in tab 4, Filename. You may choose whether it is Prefix or Suffix. I give Suffix example in here. Enter text -ubuntubuzz.com at the Suffix box. Then see below on the Result preview. The file name 1.png become 1-ubuntubuzz.com and so on. That is the function of Suffix. After that, press Finish.
    Tab 4
  6. Your files renamed. 
 

Prefix Renaming




If you want the new name to be appended in beginning of file name, than use Prefix. It is same with Suffix Renaming above except the Prefix.

Tab 4

Revert Changes



Once you rename them, the changes go permanently. If your renaming is wrong, how to revert them back? The answer is Find and Replace. KRename has that feature.

  1. Prepare the files. 
  2. Open the files. 
  3. At the Tab 4, press Find and Replace. Press Add button.
  4. In the small dialog Find and Replace, type the text in name you want to remove. For example, I want to remove the suffix -ubuntubuzz.com. So the 1-ubuntubuzz.com.png will be 1.png again. Then type -ubuntubuzz.com in the Find and type nothing in Replace With. Press OK.
    Define What to Find
  5. In the Find and Replace window, you will see a new entry. Press OK.
    Find and Replace
  6. KRename will Find and Replace them again and you will get your file names back.