1

I am trying to grab Windows file properties using Java. The information that I am trying to get is the information under details, such as: author, date created, tags, folder path, etc. I have tried to use the answer from: Reading Windows file summary properties (title, subject, author) in Java.

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

Yet, when I try this, it gives me File Not Found Exception. I have made sure that the file that I am trying to open exists. I have also made sure that Eclipse is in UTF-8 mode (for the club "\u2663" before "SummaryInformation"). I have also tried it out of UTF-8 mode. I am unsure why I am getting the File Not Found Exception. Any help would be appreciated.

Community
  • 1
  • 1
  • 2
    File name "test.txt:\u2663SummaryInformation" doesn't sound right for Windows file name. Try some simple file like "c:\test.txt" – user1697575 Mar 20 '13 at 20:10
  • that was the example from the other page. I create a file, then check to see if its a file. Then use that path with :\u2663SummaryInformation – user2187507 Mar 20 '13 at 20:12
  • Are you using Java 7? If so, Files.getAttribute(Path, String) should do the trick – Aurand Mar 20 '13 at 20:15
  • 1
    I understand that `\u2663` will be parsed to correspondent unicode character by Java **but** the character `:` is illegal in Windows for a file name. – m0skit0 Mar 20 '13 at 20:23
  • Why do you want to do it all in java? You can try to find dll which you will load using Java Native Access library. – pepuch Mar 20 '13 at 20:29
  • Okay, because the ':' is an illegal character for Windows, what is the format I should use? – user2187507 Mar 21 '13 at 12:49

0 Answers0