How to export tags to a different pc?
-
Scorpio3002
- Posts: 21
- Joined: 21 Aug 2016 05:16
How to export tags to a different pc?
I've been getting a lot of use out of the tagging feature lately; I've got about 3,000 tagged items so far. However, I'm working with three separate computers (all with XYplorer, naturally), and it sure would be useful if I could transfer the files between them without having to manually enter the tag info on each file on each computer. Is there an easy way to do this?
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to export tags to a different pc?
Welcome to the forum.
That depends... All tagged files are in the same paths on all 3 PCs? And don't forget, entries in the tag database are case-sensitive!
So if you use a folder with tagged files on PC1 that is named "myFolderWithTaggedFiles", PC2 and PC3 need to have the exact same folder (and ofc in the same location). If these requirements are met you could switch to the latest beta of XYplorer (viewforum.php?f=1) and use:
Menu - Tools - Configuration | Tags | Storage -> Relative to tags database
Afterwards you can just copy your tag.dat file, put it on a different PC and either restart XY or use
Menu - Favorites - Reload Tags Database
That depends... All tagged files are in the same paths on all 3 PCs? And don't forget, entries in the tag database are case-sensitive!
So if you use a folder with tagged files on PC1 that is named "myFolderWithTaggedFiles", PC2 and PC3 need to have the exact same folder (and ofc in the same location). If these requirements are met you could switch to the latest beta of XYplorer (viewforum.php?f=1) and use:
Menu - Tools - Configuration | Tags | Storage -> Relative to tags database
Afterwards you can just copy your tag.dat file, put it on a different PC and either restart XY or use
Menu - Favorites - Reload Tags Database
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 66678
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: How to export tags to a different pc?
Note that Configuration | Tags | Options | Database Check ... will correct any false capitalization.highend wrote:And don't forget, entries in the tag database are case-sensitive!
FAQ | XY News RSS | XY X
-
admin
- Site Admin
- Posts: 66678
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: How to export tags to a different pc?
Are these 3,000 items all in the same location (incl. subfolders of that location)?Scorpio3002 wrote:I've been getting a lot of use out of the tagging feature lately; I've got about 3,000 tagged items so far. However, I'm working with three separate computers (all with XYplorer, naturally), and it sure would be useful if I could transfer the files between them without having to manually enter the tag info on each file on each computer. Is there an easy way to do this?
FAQ | XY News RSS | XY X
-
Scorpio3002
- Posts: 21
- Joined: 21 Aug 2016 05:16
Re: How to export tags to a different pc?
They are in similar locations, but not identical. First of all, the drive names are different (not sure if that matters or not, but one computer has the files on E: while the other two have them on C:). Second, my username is different on each computer, so one computer has the files under C:/Users/Scorpio/Pictures/Wallpapers, another has them under C:/Users/[My first name]/Pictures/Wallpapers, and the third bypasses the Username altogether and just goes E:/Users/Pictures/Wallpapers (I suppose I could just similarly bypass the username on the other two computers, but would prefer not to). Third, I'm not sure if it makes any difference, but not all of the computers have all of the tagged files. Let's say I've got tagged photos in three folders: Pictures/Wallpapers, Pictures/Gifs, and Pictures/Naughty, and no one computer has all three folders.
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: How to export tags to a different pc?
items in different drives and folders - it's better to have the absolute paths in the tag db, then just do a simple [regex] replacement on the db on each pc.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
admin
- Site Admin
- Posts: 66678
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: How to export tags to a different pc?
If you don't need all pictures in one DB, you could use three local DBs (with Storage mode 3 = Relative to tags database), one in each Wallpapers folder.
FYI, in a later version I plan to allow loading multiple local DBs at once. That would be the perfect solution for you.
FYI, in a later version I plan to allow loading multiple local DBs at once. That would be the perfect solution for you.
FAQ | XY News RSS | XY X
-
Scorpio3002
- Posts: 21
- Joined: 21 Aug 2016 05:16
Re: How to export tags to a different pc?
Any chance you could explain that to someone who doesn't know what "local DBs", "Storage Mode 3", or "Absolute Paths" are? ...asking for a friend.
-
admin
- Site Admin
- Posts: 66678
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: How to export tags to a different pc?
The feature is still in geek phase, so it's not extremely comfortable to use and needs some understanding. Let's see:Scorpio3002 wrote:Any chance you could explain that to someone who doesn't know what "local DBs", "Storage Mode 3", or "Absolute Paths" are? ...asking for a friend.
A global DB is "tag.dat", located in XY's app data folder. It contains absolute paths (e.g. C:\Users\Donald\Pictures\Photo\Korea-20141015_Mi_11-44-30.jpg) to all tagged files in the whole system.
Local DBs on the other hand would be located in the same place as the tagged files they point to. They use relative paths. In "Storage Mode 3" the paths are relative to the local DB itself. So if the local DB would be located in "C:\Users\Donald\Pictures\Photo" then the relative path would be just "Korea-20141015_Mi_11-44-30.jpg".
So you would need 3 local DBs, let's call them XYplorerTag.dat:
Code: Select all
Pictures\Wallpapers\XYplorerTag.dat
Pictures\Gifs\XYplorerTag.dat
Pictures\Naughty\XYplorerTag.datFAQ | XY News RSS | XY X
-
Scorpio3002
- Posts: 21
- Joined: 21 Aug 2016 05:16
Re: How to export tags to a different pc?
I think I'm with you so far. Only thing I'm not quite clear on is how I would go about creating these local DBs, since I'm assuming they would look different than the global DB in AppData, but maybe you were planning on explaining that in the next post.admin wrote:The feature is still in geek phase, so it's not extremely comfortable to use and needs some understanding. Let's see:Scorpio3002 wrote:Any chance you could explain that to someone who doesn't know what "local DBs", "Storage Mode 3", or "Absolute Paths" are? ...asking for a friend.
A global DB is "tag.dat", located in XY's app data folder. It contains absolute paths (e.g. C:\Users\Donald\Pictures\Photo\Korea-20141015_Mi_11-44-30.jpg) to all tagged files in the whole system.
Local DBs on the other hand would be located in the same place as the tagged files they point to. They use relative paths. In "Storage Mode 3" the paths are relative to the local DB itself. So if the local DB would be located in "C:\Users\Donald\Pictures\Photo" then the relative path would be just "Korea-20141015_Mi_11-44-30.jpg".
So you would need 3 local DBs, let's call them XYplorerTag.dat:You would open them using scripting command tagload(). How exactly this can be/should done needs further explanations. Let me know if you follow me so far.Code: Select all
Pictures\Wallpapers\XYplorerTag.dat Pictures\Gifs\XYplorerTag.dat Pictures\Naughty\XYplorerTag.dat
-
admin
- Site Admin
- Posts: 66678
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: How to export tags to a different pc?
In the "Example" section you should find the answer:
Code: Select all
v17.00.0204 - 2016-08-20 22:03
+ Scripting got a new function.
Name: TagExport
Action: Exports tags data to a new tags database.
Syntax: tagexport([db], [path], [storage], [flags])
db: Path of tags database to create and export to.
If it exists it is overwritten without asking questions.
Resolved relative to current path.
Empty or missing: defaults to "<curpath>\XYplorerTag.dat".
path: Only export tags data under this path (this folder and all
subfolders, i.e. the whole branch).
Empty: export all tags data.
Missing: defaults to current path.
storage: Storage mode; on "3" it's relative to db.
flags: (bit field)
1 = remove exported items from main DB (else they are kept)
return: New tags database.
Remarks:
- SC tagexport() complements tagload(). You now can outsource specific
sections of your tags data to small local databases (tagexport) and load
them on demand from the local databases (tagload). Gains:
a) Slim down and speed up your main tags database.
b) Allow easy backup-avec-tags by keeping the local databases together
with the tagged items.
- The new tags database is *not* loaded into the app. It's just created on
disk similar to a "Save Copy As" operation.
Example:
In a path with tagged items, say hundreds of tagged photos, you want to
export the tags data of this path to a local database. This command will
create "XYplorerTag.dat" in the path, fill it with the data, and remove
the data from the main database (usually "<xydata>\tag.dat"):
tagexport(, , 3, 1);
To load the new database when you are in the path, do this:
tagload("XYplorerTag.dat");
Note that the key to all this wonderful new functionality is storage value
"3" ("Relative to tags database")!
FAQ | XY News RSS | XY X
-
Scorpio3002
- Posts: 21
- Joined: 21 Aug 2016 05:16
Re: How to export tags to a different pc?
Thank you very much! I tried exporting the Wallpapers folder to another PC, and it worked as advertised.
However, I have now created a problem for myself on the first PC, where the tags came from. Before I made the db in Pictures/Wallpapers, I made an overarching one in Pictures, so that it would contain the tags for both Wallpapers and Gifs. However, now I seem to be stuck: if I load the db in Pictures/Wallpapers, it erases the tag data for Pictures/Gifs, while loading the db from Pictures will regenerate the tags for Pictures/Gifs but erase them for Pictures/Wallpapers. I was a good boy and made a backup of the tags.db (along with all other data in the App Data folder) before installing the beta version of XYplorer, but replacing the file in App Data seems to have no effect. Any idea how I can fix this?
However, I have now created a problem for myself on the first PC, where the tags came from. Before I made the db in Pictures/Wallpapers, I made an overarching one in Pictures, so that it would contain the tags for both Wallpapers and Gifs. However, now I seem to be stuck: if I load the db in Pictures/Wallpapers, it erases the tag data for Pictures/Gifs, while loading the db from Pictures will regenerate the tags for Pictures/Gifs but erase them for Pictures/Wallpapers. I was a good boy and made a backup of the tags.db (along with all other data in the App Data folder) before installing the beta version of XYplorer, but replacing the file in App Data seems to have no effect. Any idea how I can fix this?
-
admin
- Site Admin
- Posts: 66678
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: How to export tags to a different pc?
1) When you replace the file in app data, you need to restart XY *without saving*: File | Restart without Saving
2) There is another (pretty new) way: You can reimport your exported data via scripting. See here:
2) There is another (pretty new) way: You can reimport your exported data via scripting. See here:
Code: Select all
v17.00.0208 - 2016-08-24 20:15
+ SC tagload enhanced: Now you can use it to import or include tags
databases into the current database.
Syntax: tagload([db], [mode])
db: Tags database to load; full path/name or relative to current path.
Empty: load default DB (usually "<xydata>\tag.dat").
Missing: reload current DB (same as menu Favorites | Reload Tags Database).
mode:
0 = (re)load [Default] (fully update/replace the current data)
1 = import (permanently merge into current DB)
2 = include (temporarily merge into current DB in memory; not saved to disk)
Note: If [db] is missing then [mode] is internally set to 0.
return: The full path of the loaded/reloaded/imported tags database.
Remarks:
- All header data (label colors, extra tags) are taken from the current
DB; header data from the imported DB are totally discarded.
- Dupes are checked automatically on import/include.
In case of a dupe the item of the current DB is kept, the one of the
imported DB is discarded.
- Include: You can include as many DBs as you like.
- Include: Included DBs are fully searchable with XYplorer's search by
tags functions. Not being saved to disk with the current/primary DB is
the only difference to primary DBs.
- Include: If you modify the tags of an item that has been tagged via
including a DB, this item is automatically added to the primary DB.
Otherwise the modifications would never be saved to disk.
- Include: Once you manually edit the DB in memory via "Configuration
| Tags | Options | Edit Tagged Items..." the included items lose
their temporary nature and become a permanent part of the
current/primary DB (and will be saved to disk in this DB).
> TEST CAREFULLY, make a backup before you import a 200,000 photos DB...
this pioneering work.
Examples:
tagload("XYplorerTag.dat", 1); //ímport "XYplorerTag.dat" (in current path)
tagload("D:\TagDBs\Photo2016Tag.dat", 2); //include "D:\TagDBs\Photo2016Tag.dat"
tagload(<curitem>, 1); //ímport the selected tags database
tagload(<focitem>, 2); //include the focused tags database
Three (functionally identical) ways to get rid of included databases in memory:
- tagload(); //reload primary database
- tagload(<xytagdat>); //load primary database
- Menu Favorites | Reload Tags Database
FAQ | XY News RSS | XY X
-
Scorpio3002
- Posts: 21
- Joined: 21 Aug 2016 05:16
Re: How to export tags to a different pc?
Thanks! Couldn't get replacing the app data to work, even after restarting without saving, but reimporting the tags worked like a charm. Thank you for taking the time to educate me! Thanks also for making this wonderful program; I've really enjoyed learning to use it, and I'm pretty sure I've barely scratched the surface of all the things that I can do with this product.
XYplorer Beta Club