• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Stephan van Hulst
Bartender
Pie
Posts: 6113
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the java.io.File API.
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you tried so far?
 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing
 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the java.awt.Desktop class. If allows you to launch the registered program for certain files.
 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1283
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1283
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1283
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20610
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java does not provide this information, so you will need to either use JNI or call an external program.
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Darryl
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic