Page 1 of 1

ReTag - Record/Restore tags

Posted: 27 Jun 2015 17:05
by bdeshi
THIS IS OBSOLETE. A simpler and better solution is here: viewtopic.php?f=5&p=167668#p167668

This is a "portable" method of sharing tags of a folder structure between XYplorer profiles. This records all types of XYplorer tags of all items in a folder and its subfolders and restores them when the script is executed a second time.

SETUP: Keep a clean copy of the script in <xyscripts>, then copy that to a folder scheduled for sharing.
There are no dependencies other than this single script file, you just need to keep the script intact (it saves tags inside itself), And keep the subfolder structure unchanged (The root folder itself can be moved anywhere)


DEMO: Suppose you're going to browse D:\TopSecret in another XYplorer instance which doesn't use the same tag database, and/or the folder path is different (say, \\Z\\Agent007.5\\TopSecret), but you need to see your current tags in that other XYplorer.
1. Copy this script into that root folder -- "D:\TopSecret" -- with any arbitrary name, and run it in your current XYplorer.
2. Then run the script in any other XYplorer, and tags of all child items will come back! AND the script will reset itself so you can use it on another folder.


NOTES: Just remember: label colors and extratag type/values can differ among XY profiles, there's no foolproof way to account for the arbitrary customization. And remember to read whatever the script has to say.

ReTag.xys
[/size]
ReTag.xys
[/size]

Re: ReTag - Record/Restore tags

Posted: 27 Jun 2015 21:04
by SkyFrontier
Hi, Sammay.
Thanks for sharing.

Sorry for asking before trying, but I know I wouldn't even try this without this prior knowledge - fearing messing with some obscure setting.
Do your script store tags on a remote (ie, other than official .dats) file?
By tags it means "tags, labels and comments"?
- in case of a no, can this be implemented?

I'm very interested in pushing up maximum potential from XY features I am keeping distance of because they imply saving certain data and I really dislike such a thing. My latest projects were built to deal with this and your script may fit my need. Perfect timing, I'd say... :mrgreen:

Re: ReTag - Record/Restore tags

Posted: 28 Jun 2015 06:19
by bdeshi
no the tags are stored inside the script file. The idea is you have a master copy of this script at <xyscripts>. Then you just copy it to folder that needs tag-sharing.
If I'd made it save tags in some extra file, then when copying that folder, you'd also have to copy that other file. But as it works now, the saved tags are automatically transferred with the folder, because the script lives in the folder. Completely portable. (Remember, this script is meant to be a method of sharing tags between separate XYplorers.)

"By tags it means "tags, labels and comments"?" - yes, plus the 5 extratags [but note the note on labels and extratags.]

Re: ReTag - Record/Restore tags

Posted: 09 Jul 2015 20:54
by SkyFrontier
Sammay,

First execution popped broken messages (alignment issues, I suppose - messages overflowing title bar and the like), second run went ok.
Take a look at this - I'll do captures if needed (and time permits).

Re: ReTag - Record/Restore tags

Posted: 10 Jul 2015 19:09
by bdeshi
Billions of blue blistering broken brackets!

You're right. Fixed. Thanks. :tup: