Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting temp files

Status
Not open for further replies.

viclap

Programmer
Oct 12, 2000
39
PH
Hi to all,

any example on how to delete files in Java?
Let say tmp files stored in windows\temp directory....

thanks a lot.
 
Use the
Code:
delete()
method in the
Code:
File
class. Basic example:
Code:
File temp = new File("C:\\test.txt");
temp.delete();
Consult JavaDocs for more information.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top