Re-read categories?

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, helmut, xnview

Post Reply
3x5
Posts: 30
Joined: Fri Feb 26, 2016 8:58 pm

Re-read categories?

Post by 3x5 »

Hi, I made the mistake of moving some photo folders around in my file manager, and not in xnview. Now a lot of my categories don't link to anything.

Is there a way to clear these categories and reload them from the tags in the photos themselves?
3x5
Posts: 30
Joined: Fri Feb 26, 2016 8:58 pm

Re: Re-read categories?

Post by 3x5 »

Nevermind, I just deleted the .db files.
User avatar
michel038
XnThusiast
Posts: 1282
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Re-read categories?

Post by michel038 »

If someone needs an answer , two solutions

1)
When you use categories, you should sometimes export Files's categories as a xml file.
(select at least 1 picture, then in Categories panel, right-click the small arrow menu, choose "File's categories", Export )
This XML (TEXT) file will contain paths, filenames, linked with categories. It's a backup for the database.

If xnview.db database is deleted or corrupted, then you will be able to import the same file.
If paths have changed, you can edit the xml file, use "search and replace" ... and import.

2)
You want to rebuild the whole database.
Close xnview, rename xnview.db as xnview.old, open xnview,
Go to "Tools, settings, metadata" - check "Import XMP ... to categories" and un-check the second box (Export DB ...) .
Verify other options you need to use.
Go to "Tools, settings,Catalog" , click "Add folder" until all your folders having photos are read ... maybe a long processing time.
Done
rinthe
Posts: 20
Joined: Wed Jan 18, 2017 9:12 pm

Re: Re-read categories?

Post by rinthe »

michel038 wrote: 2)
You want to rebuild the whole database.
Close xnview, rename xnview.db as xnview.old, open xnview,
Go to "Tools, settings, metadata" - check "Import XMP ... to categories" and un-check the second box (Export DB ...) .
Verify other options you need to use.
Go to "Tools, settings,Catalog" , click "Add folder" until all your folders having photos are read ... maybe a long processing time.
Done
I'm curious. What's the point of un-checking the second box (Export DB ...)? All you really need is to check "import XMP" and it will rebuild right?
User avatar
michel038
XnThusiast
Posts: 1282
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Re-read categories?

Post by michel038 »

sorry for my poor english.
If both
"Import XMP subject or IPTC keywords to DB Categories"
and
"Export DB Category to XMP subject and IPTC keywords "
options
... are checked, categories will (sometimes) contain each picture two times.

So, when building categories database, check the first option only.
When using categories for tagging , check only the second one.

In the next "settings" screen (Tools, settings, Catalog) it's the "add folder" button that builds the database.
Post Reply