Hi all,
Can any one tell me, how to find C: free space in windows using java?
Printable View
Hi all,
Can any one tell me, how to find C: free space in windows using java?
Read the API docs for the methods to get full details.Code:File disk = new File("c:");
System.out.println("disk.getTotalSpace() = " + disk.getTotalSpace());
System.out.println("disk.getFreeSpace() = " + disk.getFreeSpace());
System.out.println("disk.getUsableSpace() = " + disk.getUsableSpace());
The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents...
N. Borenstein
hi dlorde,
its working fine. Thanks for ur kind reply.