Hi to all,
any example on how to delete files in Java?
Let say tmp files stored in windows\temp directory....
thanks a lot.
Printable View
Hi to all,
any example on how to delete files in Java?
Let say tmp files stored in windows\temp directory....
thanks a lot.
Not sure about the first part, but for the second you can use the File class with the delete() method:
Code:File f = new File("c:\\windows\\temp\\tempfile.tmp");
f.delete();
Oh, and here's the documentation for the File class provided by Sun: http://java.sun.com/j2se/1.3/docs/api/java/io/File.html