How to Delete File from SD Card in Android


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();

 

 

About author


User avatar

Waqas Anwar

Founder of EzzyLearning.com, Senior Consultant, Microsoft .NET and Web Technologies

Comments