Jump to content

KRename

From KDE UserBase Wiki
This page contains changes which are not marked for translation.
Lokalize
Lokalize
  A utility to rename multiple files

Description

KRename is a tool to rename files easily.

Features

  • Rename large numbers of files
  • Rename files, by simply adding a sequence of numbers or changing case, or by using regular expressions for more advanced use cases
  • Plugins can be used to rename files using metadata from images, movies, music and more

Usage

Starting in the Files tab, Add the files to be renamed.

  • If a file is not wanted, click Remove
  • Click Remove All to start over

Destination

In the Destination tab, choose the action to be performed on the files

  • Rename the files, leaving them in the original folder
  • Copy the files to another folder, renaming them. The original files are left untouched
  • Move the files to another folder, renaming them
  • Create symbolic links in another folder. The links use the naming method requested, the original files untouched

Plugins

The plugins tab lists the plugins available Available plugins are listed in the box on the left. Choosing a plugin displays the tags that are available when renaming files

Filename

In the `Filename` tab you can define renaming rules with two levels of complexity, therefore two sub-tabs are provided: `Simple Filename` (default) and `Advanced Filename`.

Whichever tab you choose, the panel at the bottom shows a preview of the result of renaming, without applying any changes to the files yet.

To make changes permanent, click on the Finish button.

Simple Filename

Choose the naming scheme to use when renaming files

  • For Prefix and Suffix, choose Number or Date to add each to the beginning or end of the filename. A custom string may be entered in the box next to the drop-down list
  • Choose an option for the Filename or Extension. Using Custom allows the use of the tags provided by plugins
  • If using numbers, choose a starting and ending range
  • The box at the bottom is a preview of the renamed file

Advanced Filename

Find and Replace...

With Find and Replace... you can set find/replace rules, possibly using regular expressions.

Just click the Find and Replace... button, then the Add... button in the popup that opens, and you will be presented with an additional popup where you can define a rule (i.e. a find/replace pair).

For every rule you can optionally specify if it should be interpreted as a regular expression (regex).

Below is an example on how to find and replace three capture groups:

  • the first one matching 4 digits
  • the second one matching 2 digits
  • the third one matching 2 digits

all separated by a '-' sign.

Notice that a capture group is defined by a pair of opening and closing ( and )

Also notice how these capture groups can later be referenced in Replace With:, in order to build a date without the '-' separator.

A capture group is referenced by its index (starting from 1), prefixed by a \:

This will yield the following:

Authors

  • Original author: Dominik Seichter <domseichter AT web.de>
  • Current maintainer: Heiko Becker <heirecka at exherbo dot org>

More Information