-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeleteFile.java
More file actions
25 lines (23 loc) · 502 Bytes
/
DeleteFile.java
File metadata and controls
25 lines (23 loc) · 502 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package sepidsal;
import java.io.File;
/**
*
* @author Sepideh Saljooghi
*/
public class DeleteFile {
public static void main(String args[]){
try{
File f = new File("D:\\sepidsal.txt");
if(f.delete()){
System.out.print("File Deleted");
}
else
{
System.out.print("Nothing To Delete!");
}
}
catch(Exception e){
System.out.print(e);
}
}
}