Batch rename in Linux with GPRename
Do you create or manage a LOT of files? Do you have image files taken from cameras that are all named IMG_XXX.JPG Â (where XXX is a sequential number)? Do you stores of files you wish to change the names to reflect a date, a department, etc? If so, have you scoured the network trying to locate something, anything, that will help you do massive renames quickly...and you don't want to have to write a bash script to do so? Well, halt your search...the tool you need is GPRename.
GPRename is batch renamer for both files and directories that is released under the GPL v3. It's easy to install, and even easier to use. In fact, GPRename is so easy to use you will find the task of batch renaming (one that used to be a real pain) one of the easiest tasks you have. In this article I am going to show you how to install and use GPRename so you can start batch renaming all of those files and folders just waiting for a name change.
The feature list of GPRename isn't the most lengthy of lists, but what more do you need from a batch renamer than:
- Rename files and folders
- Case change
- Numerical addition
- Built in log
That's pretty much the gist of the features. Let's get on with the installation.
As you would expect, the installation of GPRename is simple:
- Open up your Add/Remove Software utility.
- Search for "gprename" (no quotes).
- Mark GPRename for installation.
- Click Apply to install.
That's it. When the installation is complete, close the Add/Remove Software tool and get ready to rename.
To start the tool in GNOME click Applications > Accessories > GPRename. To start the tool in KDE click Start > Applications > Utilities > GPRename. Which will open up the main window (See Figure 1).
As you can see I have GPRename opened to the ~/Pictures directory which is displaying only three images (it's a new account). With these three images I can demonstrate how this tool works. It's actually quite simple. let's sayÂ Â you want to add the date to all of the file names in the directory. To do this follow these steps:
- Select the files you want to rename.
- Click on the Insert/Delete tab.
- Select Insert.
- Decide where you want to insert the first character of the date (remember position 0 is the first character).
Enter the data string you want to add in the text field.
- Click Preview to view the changes (see Figure 2).
- If the preview suits you, click the Rename button to make the changes.
Now let's say you simply want to number the files in a directory. This is just as easy. To do this follow these easy steps:
- Select all the files you need to make changes to.
- Click on the Numerical tab.
- Select the number you want to start with.
- Set how you want the numbers to be incremented by.
- If you want a character between the number and the file name (such as "_") add it to the "and after" section (see Figure 3).
Make sure Keep Existing Names (either Before or After) is checked.
- Click Preview to see the changes.
- If the preview suits you, click Rename.
That's all it takes to batch rename files with Linux.
GPRename is an outstanding tool to use in place of writing shell scripts in order to rename multiple files in Linux. You won't find an easier tool for this task (if you're not already used to whipping up a shell script).Advertisement