How to Delete File from SD Card in Android

Waqas Anwar
30 July 2011
8216 Views

If you want to delete file from SD Card you can use following code:

File file = new File("/sdcard/myfile.txt");
boolean deleted = file.delete();