Events On Label Change/Assign

Hi everyone, I wanted to know if there is a way to assign an event script, after I associate, change or delete a label from a file or directory.
for example some sort of "OnLabelChange" event or if it is considered as an attribute change, I would like to understand how to intercept it.
The ultimate goal is that after I assign a label, I would like the modification date of the file to be updated.
Can you help me? Thank you
(Sorry for the possible errors but I use the translator)

There isn't an event for that, but you can make the buttons that set labels also bump the timestamps if that's what you want.

For example, if the label buttons are generated by this command now:

Properties SETLABEL !menu LABELCATEGORY raw:~(Status)

Then you just need to change the command to this:

Properties SETLABEL !menu LABELCATEGORY raw:~(Status)
[
SetAttr MODIFIED=now
]

That will add SetAttr MODIFIED=now to each of the generated buttons.

Thanks, I will possibly evaluate a solution based on your advice

I tried, the script works, but if I use the reset entry to remove the labels, unfortunately the SetAttr statement between the is not executed
Suggestions ?
Thank you

You could change the !menu to !menu,!noreset and then add a separate button that does the reset + modified bump by itself.

But can I ask why you need this? Changing labels does not affect the actual file data/content, only metadata that exists outside the file. Is this being done for a synching tool that would not copy the change over otherwise? Most such tools don't sync NTFS ADS metadata at all (although some may, so maybe your one does).

Hi, sorry for the delay in replying,
yes, I need it to synchronize files.
The program I use is FreeFileSync (Donation Edition)
I solved the file label problem.
Now the problem arises for me about directories.

I'll show you my solution for the labels currently in use:
In USER COMMANDS I create a new MSDOS script named "Setta_ADS_timestamp"
the code is :
echo %date% %time% > {filepath|noterm}:synctime.txt

(noterm is to also apply the new ads file to directories)

On the TOOLBAR I add 2 buttons:
Button 1 -> Add label or status
Code 1 ->
Properties SETLABEL=!menu,!nostoponmatch,!noreset
[
Set_ADS_timestamp
]

Button 2 -> Remove label or status
Code 2 ->
Properties SETLABEL=!reset
Set_ADS_timestamp

Currently this allows me to assign my own ADS to the selected file. Thanks to this, the files are seen as modified and therefore need to be synchronized, keeping their attributes unchanged (creation date/modification/name/size/etc..)

The problem now occurs on the folders as the sync program does not see the differences, but I think this depends on FFSync as even if I change the date of the folder manually it does not see it to be synchronized.

Small curiosity noted:
I have 2 folders containing the same content.
If I apply a label to a subfolder (source) and copy it into a folder (destination) that already contains that subfolder, DOpus asks me whether to merge the folders or rename them or possibly cancel. If I choose to merge folders, the contents are updated, but not the subfolder label.
If I instead use the copy via Teracopy for example, it merges the content and also updates the label of the subfolder in the destination.

However.. I continue to look for a solution to be able to update the folder synchronization.

Any advice will be appreciated!
HI

NOTE: As you can see from the MSDOS script I add an additional ADS. To remove them if necessary I use Microsoft streams.exe (sysinternals)
NOTE 2 : I tested copying only between ntfs folders, both local and on the lan/vpn network, but I always repeat NTFs -> NTFS