is it possible to find the available logical drives? if

Re: find available drives 80 80

Read the API for File, namely the method listRoots.

Re: find available drives 80 80

I think that File method listRoots() is your best shot. However I have no idea how this work if you have dual booting system in combinanion windows and unix

Re: find available drives 80 80

thx! I`ve been google`ing and going over the File functions (except this one) for over an hour..

File []drives = new File("").listRoots();
for(int j=0;j<drives.length;j++)
Re: find available drives 80 80

You don't even need the new File("") part - the method is static.

for(File drive : File.listRoots() )


Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.