Scripts: Transfer Tags, Label and Comment <--> Alternate Data Stream; Add/Set/Find Tags, Labels and Comment (and ADS)

Discuss and share scripts and script files...
Post Reply
Norn
Posts: 416
Joined: 24 Oct 2021 16:10

Scripts: Transfer Tags, Label and Comment <--> Alternate Data Stream; Add/Set/Find Tags, Labels and Comment (and ADS)

Post by Norn »

Note: File operations with software that does not support ADS will lose ADS tags.
Some supported software: XYplorer, Windows Explorer, Directory Opus(Not enabled by default), GoodSync, Duplicate Cleaner, WinRAR(Check an option).


Transfer Tags, Label and Comment <--> ADS(Alternate Data Stream), NTFS format only:

========================================================================== Backup dirty tags, labels and comments, To -> CEA-After browsing a folder (Tick -> Configuration | Information | Tags | Auto-refresh tags):

Code: Select all

 $fdrC = $fdrC+1;
 if ($fdrC > 2 && gettoken(tagexport( , "", , 6), 2, "Data:<crlf>")) {tagexport("E:\DirtyTags.dat", "", , 2); $fdrC = 0}
 perm $fdrC;
Set dirty tags, labels and comments to ADS. To -> Configuration | General | Custom Event Actions | Other Events | Exit (Tick -> Configuration | Information | Tags | Auto-refresh tags)

*********************************************************************************************************************
Set tags by List and write tags to ADS(Alternate Data Stream), NTFS fomat only:
ADS.png
ADS.png (31.21 KiB) Viewed 1888 times
ADS Tags.PNG
ADS Tags.PNG (25.9 KiB) Viewed 1054 times
Last edited by Norn on 11 Sep 2023 23:43, edited 36 times in total.
Win10, Win11 @100% 2560x1440 22H2

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

Re: Scripts: Add/Set/Find Tags, Alternate Data Stream Tags

Post by Norn »

Edit Tags/ADS Tags (Alternate Data Stream, NTFS fomat only): Set last Tags/ADS Tags (Alternate Data Stream, NTFS fomat only): Add Tags by popup menu and write Tags to ADS (Alternate Data Stream, NTFS fomat only):
Last edited by Norn on 17 Aug 2022 20:06, edited 15 times in total.
Win10, Win11 @100% 2560x1440 22H2

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

Re: Scripts: Add/Set/Find Tags, Alternate Data Stream Tags

Post by Norn »

Find by Tags List via Everything tool (Alternate Data Stream) (Need Everything version 1.5 Alpha, "Index attributes" Will be faster): Define a macro: In Everything, type in the following search and press ENTER:
/define Tag=AlternateDataStreamUTF8:

If successful, you should see Tag=AlternateDataStreamUTF8: in the status bar for a few seconds.
Searching for tag: is now replaced with AlternateDataStreamUTF8:
Define a macro.png
Define a macro.png (19.77 KiB) Viewed 1798 times
Searching for tag.png
Searching for tag.png (16.18 KiB) Viewed 1798 times
Find by Tags & Labels List: viewtopic.php?p=196057#p196057
Last edited by Norn on 01 Aug 2022 12:21, edited 10 times in total.
Win10, Win11 @100% 2560x1440 22H2

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

Re: Scripts: Add/Set/Find Tags, Alternate Data Stream Tags

Post by Norn »

Add tags by read ADS tags of the selected items (Alternate Data Stream):
Attachments
Add tags by read ADS tags of the selected item(s) (Alternate Data Stream)_v1.3.xys
(1.32 KiB) Downloaded 62 times
Last edited by Norn on 06 Aug 2022 19:40, edited 8 times in total.
Win10, Win11 @100% 2560x1440 22H2

Horst
Posts: 1085
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Scripts: Add/Set/Find Tags, Alternate Data Stream Tags

Post by Horst »

I think you mean Properties indexing in Everything, not attribute indexing.

I use Properties indexing for a list of named ADS streams.
Defined in the ini file like this:
property_alternate_data_stream_ansi=Tag=Tag;custom property 0=Comment;custom property 1=Tag
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69

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

Re: Scripts: Add/Set/Find Tags, Alternate Data Stream Tags

Post by Norn »

The option is named "Index attributes"...
UTF-8 format is better for me.
Last edited by Norn on 01 Aug 2022 12:15, edited 1 time in total.
Win10, Win11 @100% 2560x1440 22H2

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

Re: Scripts: Add/Set/Find Tags, Alternate Data Stream Tags

Post by Norn »

Custom column: ADS Tags (Item type: Files and Folders):

Code: Select all

//Function : Custom column: ADS Tags (Item type: Files and Folders)
//Created  : 2022-07-28
//Modified : 2022-07-29
//Version  : 1.2

 if(exists("<cc_item>:Tags")) {                         //If ADS exists
   $data = readfile("<cc_item>:Tags");                  //Read ADS Tags
   return gettoken($data, 1, "<crlf>");                //Get the first row and return
   }
Win10, Win11 @100% 2560x1440 22H2

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

Re: Scripts: Add/Set/Find Tags, Alternate Data Stream Tags

Post by Norn »

Set label by List, and set label to ADS (Alternate Data Stream, NTFS format only): Set label by the popup menu, and set label to ADS (Alternate Data Stream, NTFS format only): Set label and set label to ADS (Alternate Data Stream, NTFS format only) (Keyboard shortcut version): Set last label and set to ADS (Alternate Data Stream, NTFS format only):
Last edited by Norn on 17 Aug 2022 20:09, edited 8 times in total.
Win10, Win11 @100% 2560x1440 22H2

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

Re: Scripts: Add/Set/Find Tags and Labels, Alternate Data Stream Tags

Post by Norn »

Set label by read ADS label of the selected items (Alternate Data Stream):
Attachments
Set label by read ADS label of the selected item(s) (Alternate Data Stream)_v1.3.1.xys
(1.85 KiB) Downloaded 30 times
Last edited by Norn on 14 Jan 2023 19:14, edited 3 times in total.
Win10, Win11 @100% 2560x1440 22H2

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

Re: Scripts: Add/Set/Find Tags and Labels, Alternate Data Stream Tags

Post by Norn »

Edit Comment/ADS Comment (Alternate Data Stream, NTFS fomat only): Custom column: ADS Comment (Item type Files and Folders): Add Comment by read ADS Comment of the selected items (Alternate Data Stream):
Win10, Win11 @100% 2560x1440 22H2

Post Reply