Bug 318942 - Can't rename multiple files with just numbers
Summary: Can't rename multiple files with just numbers
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 2.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-26 18:25 UTC by Antonio Rojas
Modified: 2013-06-16 17:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Rojas 2013-04-26 18:25:13 UTC
I'm trying to rename multiple files with sequential numbers, as 1.jpg, 2.jpg, etc, but the Rename button is disabled unless I enter some character other than #

Reproducible: Always

Steps to Reproduce:
1.Choose multiple files
2.Try to rename them with sequential numbers with '#'
Actual Results:  
The 'Rename' button is disabled 

Expected Results:  
The button is enabled and the files are renamed
Comment 1 Frank Reininghaus 2013-04-27 13:11:09 UTC
Thanks for the bug report! I can confirm the problem.

However, note that what you want to achieve actually does work - if you want file names like 1.jpg, 2.jpg, etc., you should use the rename pattern "#.jpg", and not just "#".
Comment 2 Antonio Rojas 2013-04-27 13:13:15 UTC
If I do that on jpg files the extension gets duplicated, the result is 1.jpg.jpg etc.
Comment 3 Frank Reininghaus 2013-04-27 13:19:29 UTC
You're right, of course. I forgot that we preserve the extension when renaming.
Comment 4 Frank Reininghaus 2013-04-27 20:30:55 UTC
I think I've found a solution for this problem and for the related bug that the button is enabled even if there is no '#' at all in the pattern: https://git.reviewboard.kde.org/r/110223/
Comment 5 Frank Reininghaus 2013-05-02 17:24:04 UTC
Git commit cbb2a4cf471eda893623622bfe20213777a36edb by Frank Reininghaus.
Committed on 02/05/2013 at 19:23.
Pushed by freininghaus into branch 'KDE/4.10'.

Rename multiple files: Determine correctly if the name pattern is valid

The "Rename" button in the dialog should be enabled if and only if the
"new name" pattern is valid. This is the case if the pattern contains
exactly one sequence of '#', which will be replaced by digits.

This patch fixes the problem that
(a) A pattern that contains a single '#' is not considered valid, and
(b) A pattern without any '#' at all is not recognized as invalid.
FIXED-IN: 4.10.3
REVIEW: 110223

M  +4    -10   dolphin/src/views/renamedialog.cpp

http://commits.kde.org/kde-baseapps/cbb2a4cf471eda893623622bfe20213777a36edb
Comment 6 J.A. Moray 2013-06-16 17:00:17 UTC
I think this has caused a new bug.

I used to rename video file and their subtitle files with the same name (they have different extensions, so there wouldn't be a problem). I select both files, press F2, write a name (without the character #) and before I could do this, but now the Rename button is disabled unless I write the character #. So, now I have to rename each file separately, wich is tedious...
Comment 7 J.A. Moray 2013-06-16 17:04:23 UTC
I filed a new bug: https://bugs.kde.org/show_bug.cgi?id=321234