Bug 512352 - Using batch rename to prepend text to folder names truncates names at the rightmost '.' character
Summary: Using batch rename to prepend text to folder names truncates names at the rig...
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (other bugs)
Version First Reported In: 25.08.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-19 16:59 UTC by sammy
Modified: 2025-12-19 05:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sammy 2025-11-19 16:59:32 UTC
SUMMARY
Using Dolphin's "batch rename" feature to prepend text to folder names will truncate the resulting folder name at the rightmost '.' character.

STEPS TO REPRODUCE
1. In any directory, create multiple subfolders with names containing the '.' (period/full stop) character.
2. Select these folders and Right Click>Rename / press F2 to open the "Rename Items" dialog.
3. Select "Add text" under the "How to rename" dialog, choose "Before filename", and enter some text to prepend to the folder names.
4. Rename the items.

OBSERVED RESULT
Before Rename     | After add text "H " before filename
------------------|------------------------------------
1999-No Periods   | H 1999-No Periods
2000.Dr.John_Paul | H 2000.Dr
2001.Documents    | H 2001
Over 120.6        | H Over 120

EXPECTED RESULT
Before Rename     | After add text "H " before filename
------------------|------------------------------------
1999-No Periods   | H 1999-No Periods
2000.Dr.John_Paul | H 2000.Dr.John_Paul
2001.Documents    | H 2001.Documents
Over 120.6        | H Over 120.6

SOFTWARE/OS VERSIONS
(available in the Info Center app, or by running `kinfo` in a terminal window)
Output of `uname -a`: Linux hostname 6.12.58-1-lts #1 SMP PREEMPT_DYNAMIC Fri, 14 Nov 2025 05:38:58 +0000 x86_64 GNU/Linux
KDE Plasma Version: 6.5.3
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.0

ADDITIONAL INFORMATION
If two folders that are identical before the first "." character (e.g. "2001.Photos" and "2001.Videos") are renamed in this way, the user will be asked to merge the contents of the two folders after pressing Rename in the Rename Items dialog.
Comment 1 amilias 2025-12-19 05:48:23 UTC
Can confirm this behavior, same thing happens with the "replace" option as well. 
If I were to guess I'd say it's a side effect of handling file extensions, since the batch rename dialog only works on names and tries to keep extensions the same, which of course makes no sense for folders. Also, there's an edge-case of renaming files without extensions which include "." somewhere in the middle, not sure if this should be considered seeing how there's probably no catch-all solution to this.