Renaming photo files

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Renaming photo files

Dotan Cohen
I have a few thousand photos in Digikam who's filenames contain the
colon character. I plan on using Krename to remove this offending
character, however, how can I then update the Digikam database to work
with the new filenames? I am using Digikam 1.7 on Kubuntu 10.10, KDE
4.6 beta2.

Thanks!

--
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Renaming photo files

Elle Stone
Could you just use digikam rename? That way you wouldn't have to worry
about upsetting, er, updating the digikam database.

from the blue-circled "i"
 {replace:"old", "new",options}
 Replace text (options: r = regular expression, i = ignore case)

The following expression replaces all occurences of ":" with nothing
"" (at least it did on a test file, digikam 1.7 on ubuntu 10.10).

[file]{replace:":",""}.[ext]

Regards,
Elle Stone

On 1/5/11, Dotan Cohen <[hidden email]> wrote:

> I have a few thousand photos in Digikam who's filenames contain the
> colon character. I plan on using Krename to remove this offending
> character, however, how can I then update the Digikam database to work
> with the new filenames? I am using Digikam 1.7 on Kubuntu 10.10, KDE
> 4.6 beta2.
>
> Thanks!
>
> --
> Dotan Cohen
>
> http://gibberish.co.il
> http://what-is-what.com
> _______________________________________________
> Digikam-users mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-users
>
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Renaming photo files

Dotan Cohen
On Thu, Jan 6, 2011 at 02:51, Elle Stone <[hidden email]> wrote:
> Could you just use digikam rename? That way you wouldn't have to worry
> about upsetting, er, updating the digikam database.
>

If it will work on the entire album, that's tens of thousands of
photos across a tree with over one hundred nodes, then that would be
fine.


> from the blue-circled "i"

Where is this blue-circled "i"? I did find the Image->Rename option,
but it will only work on selected photos and one cannot select all
photos in the database. I did find a blue-circled "i" for
Help->Components Information however this does not seem to be to what
you are referring. I am on Digikam 1.7.

Thanks.


--
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Renaming photo files

Elle Stone
To open the rename dialog:
There are three ways that I've found (possibly there are more):
1.Select a few photographs, right-click, and rename is the fifth
option down the list on my version of digikam (1.7 from philip5 ppa,
running on ubuntu 10.10). 2. select and then hit F2 opens the dialog.
3.Menu-Image-Rename.

The blue circle:
When the rename dialog is open, look at the blank box where you enter
your renaming information. The line has an x inside a funny arrow at
the end, next to a drop down arrow. Just to the right of the box is an
icon that looks like a pencil (sort of - it is too small for me to
really see what it is supposed to be). Clicking on the pencil (if that
is what it really is) brings up several options. "Replace" is one of
the options. But ignore the pencil icon for now. Look to the right of
the pencil icon to see the blue circle with the "i" in it to see a
list of all the renaming options, along with an explanation.

To select all the items in an album:
Go to the menu at the top, click on View, look to the next to the
bottom option where it says "Include Album Sub-Tree" and check it.
That way, the entire album is visible. Warning: at least on my
computer, clicking on an album with 5000 images sends the cpu up to
100% for maybe 15 seconds (my computer is over five years old).

Will it work on your entire album without any problems?
I am not a digikam expert. I am in the process of learning how to use
digikam. I did a rename on a test album with 500 images. It went
flawlessly. But I wasn't removing ":".

I did a test rename on a couple of images after inserting some random
":" just to make sure I gave you the right string to put in the box.
It also went flawlessly.

Databases scare me silly just because it is so easy to upset them. If
I were you I'd copy a couple hundred sample images to a test album and
test away using digikam rename (and also maybe using Krename, whatever
that is, if you don't like the results with digikam rename).

It seems to me that there still is one bug with the rename, and that
is with the {unique} option, but that shouldn't affect removing ":"
from file names.

My personal experience with other DAM software (photools imatch), is
that if you rename outside the DAM software, it will treat the renamed
images as new images. But if Krename is a kde ap, maybe that makes a
difference, at least if you use a full-blown KDE desktop.

Perhaps people more experienced in Krename/Digikam combo might speak up here.

Hope that helps. There are no guarantees. Wish there were. Try a test
album first. Best of luck and let me know how it goes.

Kind Regards,
Elle Stone
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Renaming photo files

Elle Stone
Hmm, I just did some testing, being interested in this topic myself
(having around 9000 files to rename). It seems digikam really does
recognize when a file has been renamed outside of digikam. But please
check for yourself!

Here's the results of a little mini-test, and then a question for the
digikam experts:

Test results:

With digikam closed, I renamed a couple of image files using xfe file
browser. I have "rescan every start" disabled, so when I started
digikam the old file name was still in use. But upon using
Menu-Tools-'Scan for New Images', both files names changed to the new
file name. More importantly, for one of the images, I had previously
changed the metadata (using digikam) so it no longer matched what was
in the image file, and that image showed up with the correctly changed
metadata. So it looks like digikam really is reassociating the newly
renamed file with the original database entry? Awesome.

I checked the image file metadata using exiftool - all the original
file metadata is still in place, untouched (as it should be, because I
have digikam set up to not write metadata to the files).

Then I accidentally had two instances of digikam running, and the
first instance picked up a change in tags applied using the second
instance. Then when I closed the second instance (thinking I'd closed
digikam completely) and renamed a file using xfe, digikam (first
instance) picked up the renamed file immediately, without even any
kind of refresh. Awesome.

Question:
Using the "SQLite database browser" to inspect the contents of a
digikam sqlite database, I see there is a "uniqueHash" of each image,
which looks like an MD5 hash. Does the uniqueHash enable digikam to
recognize that an image has been renamed outside of digikam, and then
reassociate the new name with the existing database entry? Is this
safe to do?

Kind regards,
Elle Stone

On 1/6/11, Elle Stone <[hidden email]> wrote:

> To open the rename dialog:
> There are three ways that I've found (possibly there are more):
> 1.Select a few photographs, right-click, and rename is the fifth
> option down the list on my version of digikam (1.7 from philip5 ppa,
> running on ubuntu 10.10). 2. select and then hit F2 opens the dialog.
> 3.Menu-Image-Rename.
>
> The blue circle:
> When the rename dialog is open, look at the blank box where you enter
> your renaming information. The line has an x inside a funny arrow at
> the end, next to a drop down arrow. Just to the right of the box is an
> icon that looks like a pencil (sort of - it is too small for me to
> really see what it is supposed to be). Clicking on the pencil (if that
> is what it really is) brings up several options. "Replace" is one of
> the options. But ignore the pencil icon for now. Look to the right of
> the pencil icon to see the blue circle with the "i" in it to see a
> list of all the renaming options, along with an explanation.
>
> To select all the items in an album:
> Go to the menu at the top, click on View, look to the next to the
> bottom option where it says "Include Album Sub-Tree" and check it.
> That way, the entire album is visible. Warning: at least on my
> computer, clicking on an album with 5000 images sends the cpu up to
> 100% for maybe 15 seconds (my computer is over five years old).
>
> Will it work on your entire album without any problems?
> I am not a digikam expert. I am in the process of learning how to use
> digikam. I did a rename on a test album with 500 images. It went
> flawlessly. But I wasn't removing ":".
>
> I did a test rename on a couple of images after inserting some random
> ":" just to make sure I gave you the right string to put in the box.
> It also went flawlessly.
>
> Databases scare me silly just because it is so easy to upset them. If
> I were you I'd copy a couple hundred sample images to a test album and
> test away using digikam rename (and also maybe using Krename, whatever
> that is, if you don't like the results with digikam rename).
>
> It seems to me that there still is one bug with the rename, and that
> is with the {unique} option, but that shouldn't affect removing ":"
> from file names.
>
> My personal experience with other DAM software (photools imatch), is
> that if you rename outside the DAM software, it will treat the renamed
> images as new images. But if Krename is a kde ap, maybe that makes a
> difference, at least if you use a full-blown KDE desktop.
>
> Perhaps people more experienced in Krename/Digikam combo might speak up
> here.
>
> Hope that helps. There are no guarantees. Wish there were. Try a test
> album first. Best of luck and let me know how it goes.
>
> Kind Regards,
> Elle Stone
>
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Renaming photo files

Bugzilla from gert.kello@gmail.com
Hi

I made the same mini-test myself.

Digikam copies data from first entry with same hash. So, if You have
same file already twice in database, then the data can be taken from
either of entries. If the first found entry does not have
tags/ratings/etc then there's a problem...

Gert

> Hmm, I just did some testing, being interested in this topic myself
> (having around 9000 files to rename). It seems digikam really does
> recognize when a file has been renamed outside of digikam. But please
> check for yourself!
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Renaming photo files

Elle Stone
Renaming whether using digikam rename or an outside program seems to
leave a mess behind in the database. In my test database, some files
had been renamed twice, once using digikam rename and again using
exiftool. The database had all these files listed three times, and all
entries had the original file name associated. It was not clear to me
whether using digikam rename had any advantages over using an external
program.

It would seem a good idea to avoid renaming files if at all possible.
Especially given what Gert says about digikam using the first entry
with a given hash. Apparently the hash is not recalculated when the
file is renamed? So all the old file names keep accreting in the
database and who knows which database entry gets the associated
metadata?

Elle

On 1/7/11, Gert Kello <[hidden email]> wrote:

> Hi
>
> I made the same mini-test myself.
>
> Digikam copies data from first entry with same hash. So, if You have
> same file already twice in database, then the data can be taken from
> either of entries. If the first found entry does not have
> tags/ratings/etc then there's a problem...
>
> Gert
>
>> Hmm, I just did some testing, being interested in this topic myself
>> (having around 9000 files to rename). It seems digikam really does
>> recognize when a file has been renamed outside of digikam. But please
>> check for yourself!
> _______________________________________________
> Digikam-users mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-users
>
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Renaming photo files

david-vj
CONTENTS DELETED
The author has deleted this message.