• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get the list of drives & file Properties[urgent]  RSS feed

 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get the list of drives in a machine.I want to diplay the list of drives [with drive label & size ] and then the list of files & directories [with size & no. of files] by double-clicking the drive.I want to display the file_size, date_created,last_modified_date,permissions such as read_only, hidden etc. Please send me some code.Reply as soon as possible.[urgent]
 
Kenneth Reising
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quote from Java in a NutShell 3rd Ed regarding the java.io.File object:
<quote>
listRoots() returns an array of File objects representing all root directorys on the System. On Unix systems, for example, there is typically only one root, /. On Windows systems, however, there is a different root for ach driver letter: c:\ d:\, and e:\, for example.
</quote>
I dont know off hand how you would get more information about them (Drive Volume name for example), but this should get you started.
HTH;
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!