Command line "comments" editor?

  • Thread starter Thread starter cubaguy
  • Start date Start date
C

cubaguy

Hi,

I would be eternally grateful if someone could point me to a command
line tool that
allows editing of the NTFS "comments" file attribute (new as of win2k
and winXP)...

Thanks in advance!

CG
 
Hi,

I would be eternally grateful if someone could point me to a command
line tool that
allows editing of the NTFS "comments" file attribute (new as of win2k
and winXP)...

Thanks in advance!

CG

The short answer is, I don't know of any such tool yet.
Those comment fields are an underused feature.

You can see which NTFS files have comments with Streams or LADS:
http://www.sysinternals.com/Utilities/Streams.html
http://www.heysoft.de/nt/ep-lads.htm

You can see the actual comments in a file test.txt by typing at the
command line:
MORE <test.txt:^ESummaryInformation
(^E means hold down the Ctrl key and press the E key.)
Keep pressing the space bar to move down. The comments will be
visible, mixed with binary garbage.
 
Vic said:
By NTFS "comments" file attribute is the OP referring to Alternate
Data Streams?

Yes. (Although it's not really a file 'attribute').
Alternate Data Streams have been around since NT 3.1
Since then it has been possible to use ADS to store e.g. summary information
with a file. As this information is stored in the Master Boot Record this
provides for very fast processing and the information does net get lost if
you move a file (unless to a non-NTFS medium).
But you could not use Explorer to display this information.
Only since Windows 2000 does Explorer provide a way to
+ add/edit summary information in a file's properties tab and to
+ display this information in it's details view.
This summary information is stored in a set of streams (with some binary
components).
Like Mark R. Blain I don't know of any command line tool that lets you edit
these particular ADS.
 
Mark said:
The short answer is, I don't know of any such tool yet.
Those comment fields are an underused feature.

You can see which NTFS files have comments with Streams or LADS:
http://www.sysinternals.com/Utilities/Streams.html
http://www.heysoft.de/nt/ep-lads.htm

You can see the actual comments in a file test.txt by typing at the
command line:
MORE <test.txt:^ESummaryInformation
(^E means hold down the Ctrl key and press the E key.)
Keep pressing the space bar to move down. The comments will be
visible, mixed with binary garbage.

I think I've found the way to see the comment without the binary garbage:

append ":$DATA" (without the quotes), so the command becomes:

MORE <test.txt:^ESummaryInformation:$DATA

And also the way to edit (replace) the comment:

ECHO This is a comment>test.txt:^ESummaryInformation:$DATA
 
Sietse said:
And also the way to edit (replace) the comment:

ECHO This is a comment>test.txt:^ESummaryInformation:$DATA

Nah, while I checked if it does create the stream, I forgot to check if it
actually works in Explorer and it doesn't. :(
It doesn't create the binary bits in the stream.
 
MORE <test.txt:^ESummaryInformation:$DATA

When I tested under Windows 2000, your command executed without error
but I still got the same binary garbage. I don't think it's worth
pursuing.
 
Mark said:
When I tested under Windows 2000, your command executed without error
but I still got the same binary garbage.

<AOL> Me too </AOL>

When I got the idea, I had just a bit time left to try it out.
In the hurry, while I was certain that I tested a good test file,
I managed to test it on a file that I had created without the garbage.
No garbage in, No garbage out.
Really sorry about this.
I don't think it's worth pursuing.

Definitely not. But thanks for playing!
 
Back
Top