Categorization lost when renaming file

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, helmut, xnview

User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Categorization lost when renaming file

Post by helmut »

When renaming a categorized file in XnView, the categorization will be lost. If the file is renamed outside, this would be acceptable (but still not good), but renaming a file in XnView should keep the category information. I consider this as a bug :bug:.

XnView 1.90.2
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

Pierre, I think this is an issue that XnView should be able to handle. At least when renaming within XnView the assignement to categories should not be lost.
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

helmut wrote:Pierre, I think this is an issue that XnView should be able to handle. At least when renaming within XnView the assignement to categories should not be lost.
Yes right, i need to make some changes
Pierre.
martin.pischky

Same problem when moving files

Post by martin.pischky »

Have found same problem when moving image files from one folder to another. I have moved the files from within xnview (in Ordner (german version) view).
The file has still an an icon in the categorie folder (looks like icon of textfiles on windows) and shows the rating.

Have checked the "category.db". In table t2 the full path is stored and this should be updated on move or rename.

The rating is stored in xnview.db and there is still an entry in table Images with a reference (FolderID) to the old folder in table Folders. This should also be updated on a move.

BTW: Would be nice if categoies could be generated from iptc keywords. Should by writing a script to update categorie.db from the iptc data found.
May be I will try this...

Anyway thank you very much for XnView !!

Martin
XnView-User
Posts: 26
Joined: Wed Mar 09, 2016 11:22 am

Re: Categorization lost when renaming or moving a file

Post by XnView-User »

I just found this 9 years old post here and registered right away to tell you that the issue (or bug) described in this thread apparently hasn’t been resolved in all these years(?).

I’m using the current XnView-Version 2.35 and have exactly the same problems with my categories. As soon as I rename a file or move it to another folder the categories are lost :-(

Such files are then shown in the category folder with an icon similar to a Windows *.txt-file with the old/former file name.

Isn’t it possible somehow to optimize or refresh the “category.db”??
I can’t find anything in the program.

Like this, for me, the categories feature is quite useless.


PS: By the way. After the categorization of around 9000 photos my “category.db” file blew up to almost 5 MB with the result of a significant slow down of XnView. Browsing files within XnView now needs far much longer and very often the applications just hangs, due to this large “category.db” file. Any idea how to resolve this?
Using: XnView Classic on a Windows 7 64-bit system and XnView MP on a macOS and Windows 10 system.
User avatar
oops66
XnThusiast
Posts: 2005
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Categorization lost when renaming or moving a file

Post by oops66 »

Hello,
In your specific case (available within XnViewMP), maybe the best way is to also write these extra-datas into the .jpg embedded metadata: Settings>Metadata>IPTC & XMP ... "Export to write (DB to jpgs)" to the metadata of each .jpgs.

v Import XMP subject or IPTC keyword to DB Categories
v Export DB Category to XMP Subject: and IPTC Keyword
...
v Export rating in XMP metadata
v Export: color label in XMP metadata

v Write comment in XMP (descrîption and exifUserComment)

PS: As usual, doing some tests before is always a good idea.
XnViewMP Linux X64 - Debian - X64
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Categorization lost when renaming or moving a file

Post by xnview »

XnView-User wrote: I’m using the current XnView-Version 2.35 and have exactly the same problems with my categories. As soon as I rename a file or move it to another folder the categories are lost :-(
yes a known issue (not fixed)
PS: By the way. After the categorization of around 9000 photos my “category.db” file blew up to almost 5 MB with the result of a significant slow down of XnView. Browsing files within XnView now needs far much longer and very often the applications just hangs, due to this large “category.db” file. Any idea how to resolve this?
you have optimize (please make a backup of your db before)
Pierre.
XnView-User
Posts: 26
Joined: Wed Mar 09, 2016 11:22 am

Re: Categorization lost when renaming file

Post by XnView-User »

Thanks oops66 for your quick reply.

But I'm using, as I said, the normal/classic XnView and not the new XnViewMP. And as far as I know the new XnViewMP doesn't have a “category.db” file.

I'm a normal user, not a computer or photo specialist. Therefore I don't know what EXIF, IPTC and XMP values mean, where the differences are and if these values can be read by other photo applications or viewers as well. In the IPTC dialog for instance I see empty category values even though I already have plenty of categories specified. In the IPTC dialog it's also said that a category may only have 3 caracters. Sorry, that's all very complicated for me...

So I decided to use the category feature in XnView which is very easy to understand ;-)

Let me please ask again: Isn’t it possible with the normal/classic XnView to optimize or refresh the “category.db” after file operations like rename or move?
Using: XnView Classic on a Windows 7 64-bit system and XnView MP on a macOS and Windows 10 system.
XnView-User
Posts: 26
Joined: Wed Mar 09, 2016 11:22 am

Re: Categorization lost when renaming or moving a file

Post by XnView-User »

xnview wrote:yes a known issue (not fixed)
Ups, so I was right and this bug is known for 9 years and still not fixed? Ok, so would it be better for me to switch to the new XnViewMP ???
xnview wrote:you have optimize (please make a backup of your db before)
Sorry; I don't understand. What do you mean? Optimize what and how?
Using: XnView Classic on a Windows 7 64-bit system and XnView MP on a macOS and Windows 10 system.
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Categorization lost when renaming or moving a file

Post by xnview »

XnView-User wrote: Sorry; I don't understand. What do you mean? Optimize what and how?
you have an optimize button
Pierre.
XnView-User
Posts: 26
Joined: Wed Mar 09, 2016 11:22 am

Re: Categorization lost when renaming file

Post by XnView-User »

an optimize button? Where? Sorry, but I can't find it.
Using: XnView Classic on a Windows 7 64-bit system and XnView MP on a macOS and Windows 10 system.
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Categorization lost when renaming file

Post by xnview »

options>thumbnails>Cache - Optimize
Pierre.
XnView-User
Posts: 26
Joined: Wed Mar 09, 2016 11:22 am

Re: Categorization lost when renaming file

Post by XnView-User »

Thank you Pierre. This "button" is well hidden, I think;-)

Well; I found it and tried it out. But the whole thing led to nothing. First XnView hanged for a while (no response). Afterwards the corresponding files are still shown in the category view with that icon similar to a Windows *.txt-file and still with the old/former file names. Categories are still lost :-(

And now? What can I do?
Using: XnView Classic on a Windows 7 64-bit system and XnView MP on a macOS and Windows 10 system.
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Categorization lost when renaming file

Post by xnview »

XnView-User wrote: And now? What can I do?
sorry but optimize will not restore categories. You have renamed a lot of files or folder?
Pierre.
XnView-User
Posts: 26
Joined: Wed Mar 09, 2016 11:22 am

Re: Categorization lost when renaming file

Post by XnView-User »

Yes Pierre, I categorized around 1000 files which took me many days. And yes, afterwards I renamed quite a lot and also moved them to other or new folders (which is a common practice I believe) with the result that the formerly given categories are lost.

So back to the initial problem please:

It’s all about the “category.db” which doesn’t follow changes with file-names or -paths. With this persisting bug in the categories feature in your classic XnView application, here with no automatic refresh of the “category.db” or at least a manual possibility to do so, the categories feature in my opinion is useless.

Therefore I am now thinking about switching to your new XnViewMP application.

But how could I move from XnView to XnViewMP with all(!) my old settings?

I already tried to paste my old xnview.ini in XnViewMP to have the same layout, menue-orders etc. as in XnView, but this didn’t really work.

But most importantly:

As I see there isn’t a “category.db” in XnViewMP. So how can I import or transfer my “category.db” to XnView MP? And secondly, does the category database from XnViewMP follow changes with file-names or file-paths or would I be confronted with the same problem like in XnView, here with lost categories after file-operations like rename or move?
Using: XnView Classic on a Windows 7 64-bit system and XnView MP on a macOS and Windows 10 system.
Post Reply