My situation:
I use XnViewMP on a laptop with a small hard drive. Consequently, I store high-resolution originals on an external hard drive and keep a smaller version of all files on the laptop.
The file directory structure and individual image filenames are identical on both the external hard drive and the laptop. Additionally, the files are extensively tagged with hierarchical keywords; the keyword thesaurus used is identical across both drives.
My problem:
While the intention was for the external hard drive to serve as the master copy, with the laptop acting as a slave that could be easily regenerated, I have inadvertently added additional tags to the laptop versions. This has resulted in the "slave" actually being more up-to-date than the "master" in terms of keyword information.
My question:
Is there a way to automatically apply the updated keywords from the JPEG images stored on the laptop to their corresponding master versions on the external hard drive?
Thank you for suggestions,
Michael
Automatically copy keywords for multiple files
Moderators: XnTriq, helmut, xnview
-
- XnThusiast
- Posts: 1433
- Joined: Tue Sep 27, 2016 8:18 am
- Location: France
Re: Automatically copy keywords for multiple files
Perhaps :
Backup xnview.db
With a db editor, change paths for the the files from HDD to external hdd in this db file.
Start XnViewMP, check if catalog filter is able to show a file from hdd
Select files to be updated
View>update files from catalog.
When ended, close Xn and restore original xnview.db.
Another way :
Instead of replacing paths in the db, change " Base path" (Settings > catalog)
But It's risky, and I wouldn't recommend it unless Pierre (Xnview) confirms that it's possible and reversible.
Backup xnview.db
With a db editor, change paths for the the files from HDD to external hdd in this db file.
Start XnViewMP, check if catalog filter is able to show a file from hdd
Select files to be updated
View>update files from catalog.
When ended, close Xn and restore original xnview.db.
Another way :
Instead of replacing paths in the db, change " Base path" (Settings > catalog)
But It's risky, and I wouldn't recommend it unless Pierre (Xnview) confirms that it's possible and reversible.
Catalogage avec XnviewMP :
https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
-
- Posts: 4
- Joined: Mon Mar 04, 2024 6:06 am
Re: Automatically copy keywords for multiple files
michel038: thank you. If the 2nd suggestion works, it's obviously much simpler as it does not require understanding of the internal structure of the database and bulk manipulation of data in the database. Do you know if there is any description of what "base path" is and how it's used? (a couple of posts that I found were not of much help)
-
- XnThusiast
- Posts: 1433
- Joined: Tue Sep 27, 2016 8:18 am
- Location: France
Re: Automatically copy keywords for multiple files
After years of use and testing, I still haven't fully understood the role and use of the "base path".
Keep a copy of xnview.db is a good idea when trying some operations..
Your categories (= the catalog = database = xnviex.db) are always exported as keywords, yes ? So if the catalog is damaged, you can rebuild it with Settings>Catalog> add folder, with import options enabled in Settings>Metadata.
... hope Pierre can give you some advice
Keep a copy of xnview.db is a good idea when trying some operations..
Your categories (= the catalog = database = xnviex.db) are always exported as keywords, yes ? So if the catalog is damaged, you can rebuild it with Settings>Catalog> add folder, with import options enabled in Settings>Metadata.
... hope Pierre can give you some advice
Catalogage avec XnviewMP :
https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
-
- Author of XnView
- Posts: 45053
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Automatically copy keywords for multiple files
For example, if on a computer, your photos folder is '\\Volume\users\pierre\photos' and on another it's c:\photos'. You can set base path '\\Volume\users\pierre' & 'c:\' so only relative paths will be stored 'photos/*'
Pierre.
-
- Posts: 4
- Joined: Mon Mar 04, 2024 6:06 am
Re: Automatically copy keywords for multiple files
Pierre,
So would this solution work?
1. Set base path to c:/photos and build a catalog from small files stored on the laptop.
2. Change the base path from c:/photos to f:/photos, i.e. point it to the external hard drive. All relative paths should match, given that my file names and folder structure is identical on two drives.
3. Do View>Update files from catalog for the necessary subset of files to push newer keywords from catalog to jpegs on the external hard drive.
4. Change base path back to point to c:/photos.
I would appreciate if you could confirm if that is a viable solution.
Thank you.
So would this solution work?
1. Set base path to c:/photos and build a catalog from small files stored on the laptop.
2. Change the base path from c:/photos to f:/photos, i.e. point it to the external hard drive. All relative paths should match, given that my file names and folder structure is identical on two drives.
3. Do View>Update files from catalog for the necessary subset of files to push newer keywords from catalog to jpegs on the external hard drive.
4. Change base path back to point to c:/photos.
I would appreciate if you could confirm if that is a viable solution.
Thank you.
-
- XnThusiast
- Posts: 1433
- Joined: Tue Sep 27, 2016 8:18 am
- Location: France
Re: Automatically copy keywords for multiple files
I tried today, it's working fine.
But I have set the parent folder in base path.
In your example if you enter "C:\photos" as base path, you will have to select each subfolder, one at a time, to build the catalog. (maybe possible)
(selecting c:\photos in "import folder" does not work very well when c:\photos is selected as base path)
I suggest for your example :
1. Set base path to c:/ and build a new catalog from small files stored on the laptop with import options enabled
2. Change the base path from c:/ to f:/ i.e. point it to the external hard drive. All relative paths should match, given that my file names and folder structure is identical on two drives.
2b.Try catalog filter to ensure that new paths are ok
3. Do View>Update files from catalog for the necessary subset of files to push newer keywords from catalog to jpegs on the external hard drive with export options enabled
4. Change base path back to point to c:/
My last tests for "Base path" were carried out some years earlier ...
Thank you Pierre for this simple and obvious but necessary information
But I have set the parent folder in base path.
In your example if you enter "C:\photos" as base path, you will have to select each subfolder, one at a time, to build the catalog. (maybe possible)
(selecting c:\photos in "import folder" does not work very well when c:\photos is selected as base path)
I suggest for your example :
1. Set base path to c:/ and build a new catalog from small files stored on the laptop with import options enabled
2. Change the base path from c:/ to f:/ i.e. point it to the external hard drive. All relative paths should match, given that my file names and folder structure is identical on two drives.
2b.Try catalog filter to ensure that new paths are ok
3. Do View>Update files from catalog for the necessary subset of files to push newer keywords from catalog to jpegs on the external hard drive with export options enabled
4. Change base path back to point to c:/
My last tests for "Base path" were carried out some years earlier ...
Thank you Pierre for this simple and obvious but necessary information
Catalogage avec XnviewMP :
https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
-
- Posts: 4
- Joined: Mon Mar 04, 2024 6:06 am
Re: Automatically copy keywords for multiple files
Thank you for your help, it worked! "Update files from catalogue" doesn't actually update files for some reason, but I solved it by assigning and unassigning a category, which forced writing of all keywords into images.