Bug 226761 - Multi File rename number of digits.
Summary: Multi File rename number of digits.
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-14 08:41 UTC by Evert Vorster
Modified: 2011-09-12 02:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.6.0


Attachments
Screenshot of no leading zeros (67.95 KB, image/png)
2011-09-12 02:53 UTC, Jeffrey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Evert Vorster 2010-02-14 08:41:30 UTC
Version:            (using KDE 4.3.5)
Compiler:          GCC 4.3.3 
OS:                Linux
Installed from:    Compiled From Sources

Hi there. 

In Dolphin, I have a a bunch of files that are named pretty much at random, and I want to import them into a video editor. The name is not important, just the date they are created in. In the video editor the files are sorted to their names. 

So I assume that I can sort them to date and then select them all, and press f2 to rename them. 

So, I get this output:
1.mts
2.mts
...
10.mts
11.mts

And so on...
In the video editor the files are sorted
1.mts
10.mts
.....
2.mts
20.mts

So, I think.. right, it wants to be tricky... lets add TWO of these # in there, to give me two digits...

I was _stunned_ to see the output as:
11.mts
22.mts
.........
1010.mts
1111.mts

I see the logic... each # gives an increasing number. 

However, I want the files to be of the name:

00000000001.mts
00000000002.mts
....
00000000010.mts
00000000011.mts

How do I set the leading zero's? I searched all sorts of documentation, and could not find it... so now I respectfully ask for this to be added to Dolphin.

No, my video editor does not support sorting the files on date... nor does it do the silly "natural" name sorting. It sorts on names the POSIX way

One other place I ran into this shortcoming of rename is when I was trying to import a range of pictures into ffmpeg to make a time-lapse movie. I simply could not rename a 1000 photos ( only a few seconds of video ) so that they all follow on each other, and have the same amount of digits in the filename. 

Kind regards,
-Evert Vorster-
Comment 1 Jeffrey 2010-07-12 23:45:59 UTC
I second this, this is very important that files are named in the selected order (when listed by date, or size, or whatever) and that the # part is padded with zeros so that the files are always listed in the proper order.

Find out how many it is renaming and perhaps add an additional 0 ahead of that, so for 800 items they would be listed as:

item0001.ext
item0002.ext
...
...
item0800.ext

Thanks for KDE.
Comment 2 Peter Penz 2010-10-05 18:29:24 UTC
SVN commit 1182776 by ppenz:

- Integrate the patch from Matthias Fuchs from http://reviewboard.kde.org/r/5496 to allow having leading zeros when renaming files: E.g. Using the name "A ###.jpg" results in the filenames "A 001.jpg", "A 002.jpg"... The patch could be simplified a little bit by guaranting only one connective sequence of #'s.
- Move the renaming code into the RenameDialog

CCMAIL: mat69@gmx.net
BUG: 226761
FIXED-IN: 4.6.0


 M  +5 -12     panels/folders/folderspanel.cpp  
 M  +12 -17    views/dolphinview.cpp  
 M  +80 -15    views/renamedialog.cpp  
 M  +18 -50    views/renamedialog.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1182776
Comment 3 Jeffrey 2011-09-12 02:53:42 UTC
Created attachment 63575 [details]
Screenshot of no leading zeros

Screenshot of no leading zeros; the files renamed to test1-9 should have been renamed to test01-09 so that the files are always in the correct order
Comment 4 Jeffrey 2011-09-12 02:54:33 UTC
This doesn't seem to work for me in KDE 4.6.5 on Debian Sid, any ideas?  Do I need to enable this somewhere?
Comment 5 Jeffrey 2011-09-12 02:55:24 UTC
sorry, I read the patch description better and I needed ## in the rename; thanks much!