This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
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
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Reply 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: 1145

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: 3044
    
    1

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: 1145

Nothing
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1145

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: 1145

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: 1145

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: 1145

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: 1145

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: 19214

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
How To Ask Questions How To Answer Questions
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4163
    
    3

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: 1145

Thanks Darryl
 
I agree. Here's the link: http://jrebel.com/download
 
subject: exe file to get the property of the files in a folder
 
Similar Threads
calling property files in WEB-INF/ folder in the application
How to create a jar file of a java project that uses Derby database
loading property files across modules(WSAD)
Message Resources
Problem with JFileChooser Create New Folder when Program Files folder is selected.