|
-
Dec 15th, 2001, 11:12 AM
#1
Thread Starter
Dazed Member
Deleting files?
Does anyone know how to delete a file?
I have a JTextField which takes a user defined path. After i read the file i want to delete it but for some reason the delete() method doesnt work. I know there is a deleteOnExit() method but i need to have the file deleted during program execution.
File filepath = new File(jtf.getText()); // should have .txt extension
filepath.delete()
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|