p.mesotten
p.mesotten

Reputation: 1402

Reading Windows file summary properties (title, subject, author) in Java

If you right-click on a file in Windows and select Properties, you can manage some properties in de Summary tab, such as Title, Subject and Author, like in this example:

alt text

I'm trying to find a way to read these properties using Java. Is there a library for this? Is this even possible? Thanks in advance!

Peter

Upvotes: 7

Views: 6017

Answers (2)

Michael Borgwardt
Michael Borgwardt

Reputation: 346327

That information is stored in an NTFS Alternate Data Stream named "♣SummaryInformation" - not sure if Java supports teh reading of ADS data via the colon notation.

Update: Apparently this should work:

FileInputStream in = new FileInputStream("test.txt:\u2663SummaryInformation");

You'll have to figure out the format yourself.

Upvotes: 5

Christian Kuetbach
Christian Kuetbach

Reputation: 16060

In Java 7 it may work, but until then you have to use a native dll, to get that information.

Upvotes: 0

Related Questions