1

I want to access the enhanced file properties (windows) in java.

(right-clicking the file, and selecting 'properties')

Is there a way the read the properties

e.g. bitrate, author, version,...With Files.readAttributes(p, BasicFileAttributes.class)

I only get the basic attributes. If possible in pure java.

Alexander Vogt
  • 17,879
  • 13
  • 52
  • 68
SJX
  • 1,071
  • 14
  • 15
  • Read the file as a binary file and you can see all the data in that file, the trick is know how to read the binary format, which depends on the file type. readAttributes only gives you the filesystem attributes, and doesn't read the contents of the file. – Peter Lawrey Dec 10 '13 at 09:49
  • Some of these properties are stored in the filesystem rather than in the file (this is a Windows behaviour). Why write Windows specific code in Java? – Jobbo Dec 10 '13 at 09:51
  • If you are looking for meta data of media files then you have to either know the format yoursel and read the file in binary mode to extract them or use a dedicated library, for audio files you could have a look at this similar [question](http://stackoverflow.com/q/5327019/1113392) – A4L Dec 10 '13 at 09:55
  • Based on the java FileAttributes, it seems there is no standard way http://docs.oracle.com/javase/tutorial/essential/io/fileAttr.html – lkamal Dec 10 '13 at 09:56
  • May this will help you [question](http://stackoverflow.com/questions/10824027/get-the-metadata-of-a-file). – Yagnesh Agola Dec 10 '13 at 10:07

0 Answers0