Joe Ess wrote:Or you could use the methods of java.io.File like getFreeSpace() and getTotalSpace().
+1. These got added in Java 6. Note that they are not static methods, because the values (may) differ for each root. Simply create a new file for C:\:
You can also use File.listRoots() to list all roots, then call these methods on those.