//======== Delete Specific File From SDCARD ======================
private void deleteFile() {
File list = new File(Environment.getExternalStorageDirectory() + "/Directory Name/");
File[] vidlist = list.listFiles(new FilenameFilter() {
public boolean accept(File dir, String filename) {
return ((filename.endsWith(".temp")));
}
});
for (int i = 0; i < vidlist.length; i++) {
vidlist[i].delete();
}
}
No comments:
Post a Comment