File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes finding out the file properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "finding out the file properties" Watch "finding out the file properties" New topic
Author

finding out the file properties

pradeep samudrala
Greenhorn

Joined: Feb 21, 2007
Posts: 7
i want to find out the properties of file(exe file)like version number,size on disk and etc.can any body help me in this regard..
thanks in advance...
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
Java concentrates all sorts of file related methods in the java.io.File class. That is where you should start looking.

For details that File can't provide you (like version number) you will probably have to go to operating system specific methods.

Bill
pradeep samudrala
Greenhorn

Joined: Feb 21, 2007
Posts: 7
Thanks for you reply.but through File class we can able to find out some properties like is it hidden or not.but i want to find out the properties like File version,author,title,disk on size .i couldn't found any methods in the standard api.Please help me if any body knows it..
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
.i couldn't found any methods in the standard api


There is a very good reason for that - the designers intend Java to run on as many operating systems as possible, therefore the standard library only contains functions that can reasonably be expected to work everywhere.

You are asking about file properties that are NOT industry standards or portable across multiple operating systems. You are going to have to dig into the details of each type of file format on a case by case basis.

This web site has collected many of the common formats - if this was my problem I would start my search there.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: finding out the file properties