Tag Backup - Rev. 1 / 2012/09/15
Re: Tag Backup - Rev. 1 / 2012/09/15
As NTFS ADS is still alive and the actual Everything search engine can index and search for streams
I use it successfully with Total Commander and Everything.
Also I can successfully use Highends Everything script to search for my NTFS ADS tagged files.
To make an interface to XY tags I tried this old Tag Backup script.
Its no longer working in the actual XY version.
Is there any update or newer version of it available ?
I use it successfully with Total Commander and Everything.
Also I can successfully use Highends Everything script to search for my NTFS ADS tagged files.
To make an interface to XY tags I tried this old Tag Backup script.
Its no longer working in the actual XY version.
Is there any update or newer version of it available ?
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Re: Tag Backup - Rev. 1 / 2012/09/15
I've a modified version in a more modern format (with functions)
BUT...
It requires a specific workflow (afaik as the original one as well):
You can't just read existing ads and import them because the script reads a specific stream name.
Any other approach (via cmd) would require a single
It's better using PowerShell but it has a big drawback as well: Older versions (e.g. 5.x) don't support reading streams for folders...
AlternateStreamView from NirSoft would probably be the best bet but it suffers from using GUI settings when invoked from the command line.
So if you have e.g. the "Full Stream Name" column disabled, a call to it could show no results at all...
BUT...
It requires a specific workflow (afaik as the original one as well):
You can't just read existing ads and import them because the script reads a specific stream name.
Any other approach (via cmd) would require a single
dir /r
via a runret()
for each file / folder and a lot of parsing afterwards.It's better using PowerShell but it has a big drawback as well: Older versions (e.g. 5.x) don't support reading streams for folders...
AlternateStreamView from NirSoft would probably be the best bet but it suffers from using GUI settings when invoked from the command line.
So if you have e.g. the "Full Stream Name" column disabled, a call to it could show no results at all...
One of my scripts helped you out? Please donate via Paypal
Re: Tag Backup - Rev. 1 / 2012/09/15
Thanks for the reply.
I'll stick with my ads Tags from TC.
I can search for them in XY with your Everything script, which is fast as the streams content is indexed.
Settings streams in TC is easy, max 10 different names, with any content.
Deleting streams works with streams.exe from Sysinternals.
I'll stick with my ads Tags from TC.
I can search for them in XY with your Everything script, which is fast as the streams content is indexed.
Settings streams in TC is easy, max 10 different names, with any content.
Deleting streams works with streams.exe from Sysinternals.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Re: Tag Backup - Rev. 1 / 2012/09/15
Hi Horst,
I'm no longer mantaining this script unfortunately - even if I struck that bit in the intro, it was a proof-of-concept I never actually used myself.
Highend's reply is always on point
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Re: Tag Backup - Rev. 1 / 2012/09/15
Ok, I've written my own streams utility
It works fine on a few testfiles and folders but I don't use ADS personally, so is there anyone who wants to try it out?
It's a command line application so it's output can easily read by XYplorer to work in conjunction with a
It supports alternate data streams even in overlong paths / files^^
It also allows to delete streams via the flag
To make output parsable with minimal effort it support a few command line flags:
So the normal output without flags would look like this
This is practically like all other existing tools (Sysinternals streams, Nirsofts AlternateStreamView, etc.)
The parsable way:
It works fine on a few testfiles and folders but I don't use ADS personally, so is there anyone who wants to try it out?
It's a command line application so it's output can easily read by XYplorer to work in conjunction with a
runret()
script command.It supports alternate data streams even in overlong paths / files^^
It also allows to delete streams via the flag
--delete=1 (default = 0)
To make output parsable with minimal effort it support a few command line flags:
Code: Select all
--sep-name="|" (default = ":")
--sep-type="|" (default = ":")
--sep-size="|" (default = <TAB>)
--omit-type=1 (default = 0)
--omit-size=1 (default = 0)
Code: Select all
streams_x64.exe "R:\ads"
R:\ads\1 1.txt:filestream1:$DATA 14
R:\ads\3 3.txt:filestream1:$DATA 3
R:\ads\3 3.txt:filestream2:$DATA 4
R:\ads\222:folderstream1:$DATA 5
R:\ads\222\b.txt:filestream1:$DATA 6
The parsable way:
Code: Select all
streams_x64.exe "R:\ads" --sep-name="|" --omit-type=1 --omit-size=1
R:\ads\1 1.txt|filestream1
R:\ads\3 3.txt|filestream1
R:\ads\3 3.txt|filestream2
R:\ads\222|folderstream1
R:\ads\222\b.txt|filestream1
One of my scripts helped you out? Please donate via Paypal
Re: Tag Backup - Rev. 1 / 2012/09/15
@highend
I can already search for my ADS streams with Everything script in XY.
I found ADS streams (tags) better suited to my environment compared to XY tags
as I'm using several file managers and Windows Explorer.
So the only missing function in XY is a way to set an ADS stream (tag) on one or several files.
Its not an urgent need as I can easy do it in TC.
I can already search for my ADS streams with Everything script in XY.
I found ADS streams (tags) better suited to my environment compared to XY tags
as I'm using several file managers and Windows Explorer.
So the only missing function in XY is a way to set an ADS stream (tag) on one or several files.
Its not an urgent need as I can easy do it in TC.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Re: Tag Backup - Rev. 1 / 2012/09/15
There is no missing function...So the only missing function in XY is a way to set an ADS stream (tag) on one or several files
Code: Select all
$path = "R:\1.txt";
$stream = "stream_name";
$tag = "some tag";
writefile("$path:$stream", $tag, , "utf8");
One of my scripts helped you out? Please donate via Paypal
Re: Tag Backup - Rev. 1 / 2012/09/15
Ok, did it like this.
The simple writefile has one big disadvantage, it changes the modified date of the files.
For setting stream tags I don't want to change the file dates and it preserves them in TC.
Is there any simple writefile replacement to preserve the dates ?
The simple writefile has one big disadvantage, it changes the modified date of the files.
For setting stream tags I don't want to change the file dates and it preserves them in TC.
Is there any simple writefile replacement to preserve the dates ?
Code: Select all
// Set any value to the Tag stream for selected files.
// Check if there's at least one file selected
$selected = <get SelectedItemsPathNamesSlashed>;
$cntSelected = gettoken($selected, "count", <crlf>);
end ($cntSelected == 0), "No file(s) selected, aborted!";
$cntFiles = gettoken(formatlist($selected, "f", <crlf>, "!*\"), "count", <crlf>);
end ($cntSelected != $cntFiles), "Folder(s) can't be selected, aborted!";
$stream = "Tag";
$notes = "";
perm $LastTag;
$tag = trim(input("Set Tag", $notes, $LastTag, "e"));
end ($tag == ""), "No tag entered, aborted!";
$LastTag = $tag;
foreach($item, $selected, <crlf>, "e") {
if (exists($item) == 2) { continue; }
writefile("$item:$stream", $tag, , "utf8");
};
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Re: Tag Backup - Rev. 1 / 2012/09/15
No, there isn't. Why don't you just store the date and timestamp the file after writing the stream?
One of my scripts helped you out? Please donate via Paypal
Re: Tag Backup - Rev. 1 / 2012/09/15
Ok, so I will add this to the script.
I have to search the help for some examples how to do this
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Re: Tag Backup - Rev. 1 / 2012/09/15
Its done
The script works perfect for me.
It preserves creation and modifictaion times.
Thanks for suggestions and help.
The script works perfect for me.
It preserves creation and modifictaion times.
Thanks for suggestions and help.
Code: Select all
// Set any value to the Tag stream for selected files.
// The files creation and modification dates are preserved.
// Check if there's at least one file selected
$selected = <get SelectedItemsPathNamesSlashed>;
$cntSelected = gettoken($selected, "count", <crlf>);
end ($cntSelected == 0), "No file(s) selected, aborted!";
// Folders are not supported
$cntFiles = gettoken(formatlist($selected, "f", <crlf>, "!*\"), "count", <crlf>);
end ($cntSelected != $cntFiles), "Folder(s) can't be selected, aborted!";
// Get the new value for Tag
$stream = "Tag";
$notes = "";
perm $LastTag;
$tag = trim(input("Set Tag", $notes, $LastTag, "e"));
end ($tag == ""), "No tag entered, aborted!";
$LastTag = $tag;
foreach($item, $selected, <crlf>, "e") {
if (exists($item) == 2) { continue; }
// Save time stamps, write stream, restore timestamps
$created = property("#date.c", $item);
$modified = property("#date.m", $item);
writefile("$item:$stream", $tag, , "utf8");
timestamp "c", $created, $item;
timestamp "m", $modified, $item;
};
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Re: Tag Backup - Rev. 1 / 2012/09/15
writefile()
for an existing file doesn't change its created time...One of my scripts helped you out? Please donate via Paypal
Re: Tag Backup - Rev. 1 / 2012/09/15
Thanks, I removed save/restore creation date now.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Re: Tag Backup - Rev. 1 / 2012/09/15
Hello Marco,
I am new to XYplorer, and currently, I am trying to see if this is a good solution for me to replace Windows explorer. I noticed the tag capabilities of XYplorer and think it is good, but I was wondering how this can be combined with the tags in, for example, MS Office files. Because the downside of tags in XYplorer is that when files are moved outside XYplorer, the tags get messed up (if I understood correctly). One way to safeguard this would be to sync tags in office files with tags in XYplorer. Of course, other filetypes have other types of tags or no tags at all.
So does your script work in syncing the XYplorer stages with the meta-information tags in MS Office files? Perhaps it is possible to match the tag changes in XYplorer with the tags in Office files? Does your script do that?
Thank you in advance for your consideration!
Kind regards,
Rob
I am new to XYplorer, and currently, I am trying to see if this is a good solution for me to replace Windows explorer. I noticed the tag capabilities of XYplorer and think it is good, but I was wondering how this can be combined with the tags in, for example, MS Office files. Because the downside of tags in XYplorer is that when files are moved outside XYplorer, the tags get messed up (if I understood correctly). One way to safeguard this would be to sync tags in office files with tags in XYplorer. Of course, other filetypes have other types of tags or no tags at all.
So does your script work in syncing the XYplorer stages with the meta-information tags in MS Office files? Perhaps it is possible to match the tag changes in XYplorer with the tags in Office files? Does your script do that?
Thank you in advance for your consideration!
Kind regards,
Rob
Re: Tag Backup - Rev. 1 / 2012/09/15
No, it's about using alternative data streams and office files metadata is not stored inside them. Sure, there are tools to read them (e.g. exiftool can do this) but updating them via a command line tool is a whole different story...So does your script work in syncing the XYplorer stages with the meta-information tags in MS Office files?
One of my scripts helped you out? Please donate via Paypal