Jump to content

KRename: Difference between revisions

From KDE UserBase Wiki
Claus chr (talk | contribs)
Marked this version for translation
Claus chr (talk | contribs)
Marked this version for translation
 
(15 intermediate revisions by 9 users not shown)
Line 3: Line 3:
{|class="tablecenter vertical-centered
{|class="tablecenter vertical-centered
|[[Image:KRename.png|48px|left|Lokalize]]||&nbsp;||<translate><!--T:1-->
|[[Image:KRename.png|48px|left|Lokalize]]||&nbsp;||<translate><!--T:1-->
'''A batch rename application. '''</translate>
A utility to rename multiple files</translate>
|}
|}
<translate>
<translate>
<!--T:2-->
<!--T:17-->
__TOC__
[[Image:krename-start.png]]
'''KRename''' is KDE's swiss army knife to rename files.


<!--T:3-->
== Description == <!--T:18-->
It uses plugins to make use of meta data, allows you to change cases, add numbers and many more.


<!--T:4-->
<!--T:19-->
Renaming of thousand files in one run is no problem.
'''KRename''' is a tool to rename files easily.


== Screenshots == <!--T:5-->
== Features == <!--T:20-->


<!--T:6-->
<!--T:21-->
{|class="tablecenter" style="border:1px solid darkgray;"
* Rename large numbers of files
|[[Image:Krename1.png|thumb|350px|center|
 
Choosing options in the <menuchoice>Filename</menuchoice> screen]]
<!--T:22-->
|}
* Rename files, by simply adding a sequence of numbers or changing case, or by using regular expressions for more advanced use cases
 
<!--T:23-->
* Plugins can be used to rename files using metadata from images, movies, music and more
 
<!--T:24-->
== Usage ==
Starting in the Files tab, '''Add''' the files to be renamed.
 
<!--T:36-->
[[Image:krename-1.png]]
* If a file is not wanted, click '''Remove'''
* Click '''Remove All''' to start over
 
<!--T:25-->
=== Destination ===
In the Destination tab, choose the action to be performed on the files
[[Image:krename-2.png]]
* 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
 
<!--T:26-->
=== Plugins ===
The plugins tab lists the plugins available
[[Image:krename-3.png]]
Available plugins are listed in the box on the left. Choosing a plugin displays the tags that are available when renaming files
 
=== Filename === <!--T:27-->
 
<!--T:37-->
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`.
 
<!--T:38-->
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.
 
<!--T:39-->
To make changes permanent, click on the '''Finish''' button.
 
<!--T:40-->
==== Simple Filename ====
[[Image:krename-4.png]]
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 ==== <!--T:41-->
 
<!--T:42-->
[[Image:Advanced Filename.png]]


===== Find and Replace... ===== <!--T:43-->


<!--T:7-->
<!--T:44-->
{|class="tablecenter" style="border:1px solid darkgray;"
With '''Find and Replace...''' you can set find/replace rules, possibly using regular expressions.
|[[Image:Krename2.png|thumb|350px|center|
Maybe you need short snappy names to add to your web page]]
|}


<!--T:45-->
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).


<!--T:8-->
<!--T:46-->
{|class="tablecenter" style="border:1px solid darkgray;"
For every rule you can optionally specify if it should be interpreted as a regular expression (regex).
|[[Image:Krename3.png|thumb|350px|center|
Perhaps the subject of the snapshots is important]]
|}


== Build from source == <!--T:12-->
<!--T:47-->
* Latest release: <code>v4.90.90 (aka 5.0 beta)</code>
Below is an example on how to find and replace three capture groups:
* Source tarball: https://download.kde.org/unstable/krename/4.90.90/krename-4.90.90.tar.xz
* the first one matching 4 digits
* Signature: https://download.kde.org/unstable/krename/4.90.90/krename-4.90.90.tar.xz.sig
* the second one matching 2 digits
* the third one matching 2 digits
all separated by a '-' sign.


<!--T:48-->
Notice that a capture group is defined by a pair of opening and closing '''(''' and ''')'''


<!--T:13-->
<!--T:49-->
Dependencies:
Also notice how these capture groups can later be referenced in '''Replace With:''', in order to build a date without the '-' separator.


<!--T:14-->
<!--T:50-->
* Qt5 and KF5
A capture group is referenced by its index (starting from 1), prefixed by a '''\''':
* Exiv2 (optional): http://www.exiv2.org
* Freetype (optional): https://www.freetype.org/
* PoDoFo (optional): http://podofo.sourceforge.net/
* Taglib (optional): https://taglib.github.io/


<!--T:51-->
[[File:Screenshot 20250424 084905.png]]


<!--T:15-->
<!--T:52-->
Assuming that you have all the dependencies already installed, just do:
This will yield the following:


<!--T:16-->
<!--T:53-->
<syntaxhighlight lang="bash">
[[File:Screenshot 20250424 085445.png]]
git clone git://anongit.kde.org/krename.git
cd krename
mkdir build && cd build
cmake ..
sudo make install
</syntaxhighlight>


== Authors == <!--T:9-->
== Authors == <!--T:9-->
<!--T:29-->
* Original author: Dominik Seichter <domseichter AT web.de>
* Original author: Dominik Seichter <domseichter AT web.de>
<!--T:30-->
* Current maintainer: Heiko Becker <heirecka at exherbo dot org>
* Current maintainer: Heiko Becker <heirecka at exherbo dot org>


== External links == <!--T:10-->
== More Information == <!--T:10-->
 
<!--T:35-->
* [https://kde.org/applications/en/utilities/org.kde.krename Application information]
 
<!--T:32-->
* [https://invent.kde.org/utilities/krename Git repo]
 
<!--T:33-->
* [https://bugs.kde.org/enter_bug.cgi?product=krename&format=guided Bug tracker]
* [https://bugs.kde.org/enter_bug.cgi?product=krename&format=guided Bug tracker]
* [http://www.krename.net/ Homepage]
 
* [http://www.kde.org.uk/apps/krename/ Article with description and an interview]
<!--T:54-->
* [http://www.krename.net/Documentation.17.0.html Documentation]
<!--Original KRename Manual-->
* Original Manual: [[File:KRename-3.0.12.pdf]]


<!--T:11-->
<!--T:11-->

Latest revision as of 16:11, 1 May 2025

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