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|
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.
- Prepare the files to be renamed. I prepare here six PNG files. I want to add ubuntubuzz.com text in every file name.
- Open KRename.
- 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.
- You are now in tab 2, Destination. Select Rename input files here. Go to tab 4. Ignore tab 3.
- 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.
- Your files renamed.
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.
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.
- Prepare the files.
- Open the files.
- At the Tab 4, press Find and Replace. Press Add button.
- 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
- In the Find and Replace window, you will see a new entry. Press OK.
Find and Replace
- KRename will Find and Replace them again and you will get your file names back.