broken file path

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

Moderators: XnTriq, xnview

shanio
Posts: 7
Joined: Sat Jun 05, 2021 12:21 pm

broken file path

Post by shanio »

Hi all,
I am new on XnView and didn't find answer to my question after searching on the forum.
Mac os x 10.14 XnView 0984
Here is my problem:
I have images and others types files together. Sometimes I change the place (folders) in finder. After that the image file in XnView is of course not with the right path.
I can see the wrong path on "informations" but is there any possibility to edit it ?
I know where I putted the folder and a I know the new path, but XnView don't. The images files have the important informations of categories and it's why I would like to edit path only to save all informations about files.

Hope it's clear ;-)

thanks for your help

Shanio
User avatar
michel038
Posts: 782
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: broken file path

Post by michel038 »

You can select photos and click "View, Update catalog from files"
Or, if you have many folders to process, you can delete them in "Settings, Catalog", and " import Folders" in the same table...

For both methods, Import options must be set in "Settings, Metadata"
shanio
Posts: 7
Joined: Sat Jun 05, 2021 12:21 pm

Re: broken file path

Post by shanio »

Ah ! Thank you very much for you answer Michel038. I didn't see that there is something new in the forum...

Well, your solutions:
1 - "View, Update catalog from files" doesn't work at all
2 - many folders to process, you can delete them - I think that with this solution all information about categories will be delete too, non? Didn't try it for this reason.

I find a solution for me, I don't recommend it - or if you want to do it please backup your XnView.db - but this solution is working very well!

You need to change the path directly in the database XnView.db with any SQLite database editor. There is the table "Folders" with the field "Pathname". All what I have to do is find/replace the pathnames to update and that's all. In this way I can save all my categories and associated metadata with the files!
User avatar
michel038
Posts: 782
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: broken file path

Post by michel038 »

- many folders to process, you can delete them - I think that with this solution all information about categories will be delete too, non? Didn't try it for this reason.
That's right !
I'm sorry. I always forget that many people don't use the option to export categories as embedded metadata !
I would like xnviewmp to explicitly warn that categories should be saved either in embedded keywords or through backups of the xnview.db file (or by using "File's categories, Export " menu )


If export options are enabled, categories are saved as (iptc or xmp) keywords. So, "update catalog from files" will work, as well as deleting / adding folders.
But if they are not, your solution (backup, and edit xnview.db) is the best one
shanio
Posts: 7
Joined: Sat Jun 05, 2021 12:21 pm

Re: broken file path

Post by shanio »

Yes I think I saw this option and... I forgot... too many informations
But it's a good idea to try it!
thanks michel for this tip