tagexport(), dirty tags, removed ones aren't saved

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

tagexport(), dirty tags, removed ones aren't saved

Post by highend »

A fresh instance, only 2 items are tagged, 3 files exist.

Code: Select all

D:\1.txt => abc
D:\2.txt => def
D:\3.txt => Not tagged
Now the following changes happen:

Code: Select all

D:\1.txt => Remove tag
D:\2.txt => Change tag to: df
D:\3.txt => Add tag: ghi
The code is executed:

Code: Select all

$file = "D:\tag_backup.dat";
    tagexport($file, "", , 2);
The resulting file only contains
the changed tag for 2.txt and the added tag for 3.txt
but it doesn't contain the removing of the tag for 1.txt^^

That's bad, if you need a disaster backup because the access to a (network) db is interrupted and you restore it later on, all removed tags are still present
One of my scripts helped you out? Please donate via Paypal

Norn
Posts: 508
Joined: 24 Oct 2021 16:10

Re: tagexport(), dirty tags, removed ones aren't saved

Post by Norn »

Agreed, I have a script in CEA-Exit that writes dirty tags to ADS, when I remove the tag, the tag in ADS should also be removed.
Windows 11 24H2 @100% 2560x1440

admin
Site Admin
Posts: 66560
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: tagexport(), dirty tags, removed ones aren't saved

Post by admin »

For removed tags (where the item comes out with no tags at all) this only works with the "ghost tag" (set label field to "-888") which by default is not used. You can tick "Configuration | Information | Tags | Auto-refresh tags" to make it work.

Post Reply