aspose file tools*
The moose likes Java in General and the fly likes exe file to get the property of the files in a folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "exe file to get the property of the files in a folder" Watch "exe file to get the property of the files in a folder" New topic
Author

exe file to get the property of the files in a folder

Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1281

In java I need to create a launcher .. whose execution gave us the property details of files in a particular folder...how can i do this task?


No Kaustubh No Fun, Know Kaustubh Know Fun..
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3649
    
  17

Take a look at the java.io.File API.
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

What have you tried so far?


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1281

Nothing
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1281

yup finally i started something.......i created a program which got the name of all the files from the folder.....but how to get the properties of the files(basically all are dll files and want to read version, comments, description under version tab) and create a launcher of it is not done yet ... putting the code below please help me out..


Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Look at the java.awt.Desktop class. If allows you to launch the registered program for certain files.
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1281

Wouter Oet wrote:Look at the java.awt.Desktop class. If allows you to launch the registered program for certain files.


didn't get anything from it wouter
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1281

one code that i found is having some info of version tab which is mentioned on the top but not giving the hole information under item name option..pasting the code below... please take a look.....


Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1281

another option that I've found is to covert this dll files into text format and then can read all the version information from it... does it a proper way to do it... help me out

kaustubh
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1281

IS there any API which communicated with windows OS and get the required information for us or we should always try to use VB script or some other legacy code
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19785
    
  20

Java does not provide this information, so you will need to either use JNI or call an external program.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

Instead of the VBScript in the code you posted, try this:and get rid of the regex matching, it won't be needed.

edit And make sure to go through all sections of When Runtime.exec() won't.


luck, db
There are no new questions, but there may be new answers.
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1281

Thanks Darryl
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: exe file to get the property of the files in a folder