Page 1 of 1
Export Local Tags Automatically, when i tag colour label tagged
Posted: 15 Nov 2026 18:51
by shamsudeen
Hi, can someone please share the script to "export local tags" automatically, when i tag a file or folder with colour label tag.
Thank you very much
Re: Export Local Tags Automatically, when i tag colour label tagged
Posted: 15 Nov 2026 19:21
by Norn
I made this simple script a while ago, but haven't actually used it myself. You can add it to Custom Event Actions to run it automatically.
Code: Select all
/*
Function : Auto Import/Export Tags (Custom Event Action) (2022-07-07)
Version : v1.1 (2026-11-15)
*/
// Import tags if XYplorerTag.dat exists in the current folder
if (exists("<curpath>\XYplorerTag.dat") == "1") {
tagload("<curpath>\XYplorerTag.dat", 1);
}
// Get tag data from the current folder
$data = tagexport(, "<curpath>", 3, 4);
// Write to XYplorerTag.dat if tagged items exist
if (gettoken($data, 2, "Data:<crlf>")) {
writefile("<curpath>\XYplorerTag.dat", $data);
}
Re: Export Local Tags Automatically, when i tag colour label tagged
Posted: 16 Nov 2026 11:01
by shamsudeen
Norn wrote: ↑15 Nov 2026 19:21
I made this simple script a while ago, but haven't actually used it myself. You can add it to Custom Event Actions to run it automatically.
Code: Select all
/*
Function : Auto Import/Export Tags (Custom Event Action) (2022-07-07)
Version : v1.1 (2026-11-15)
*/
// Import tags if XYplorerTag.dat exists in the current folder
if (exists("<curpath>\XYplorerTag.dat") == "1") {
tagload("<curpath>\XYplorerTag.dat", 1);
}
// Get tag data from the current folder
$data = tagexport(, "<curpath>", 3, 4);
// Write to XYplorerTag.dat if tagged items exist
if (gettoken($data, 2, "Data:<crlf>")) {
writefile("<curpath>\XYplorerTag.dat", $data);
}
Hi, thank you for the script, it works well. i added the script in custom event action on existing the xyplorer.
is that possible to set the script as soon as i set color label tag or comment tag.
Thank you very much for the script
Re: Export Local Tags Automatically, when i tag colour label tagged
Posted: 16 Nov 2026 14:00
by Norn
The only suitable CEA is Before browsing a folder. If you want to export tags immediately after adding them, you'll need to use scripts to add the tags and trigger the export.
Re: Export Local Tags Automatically, when i tag colour label tagged
Posted: 16 Nov 2026 18:11
by shamsudeen
Thank you.
I set both on existing and before browsing a folder.
Thank you again