Java tutorial
//package com.java2s; import java.io.File; import android.os.Environment; public class Main { public static String BACKUPPATH = Environment.getExternalStorageDirectory().getAbsolutePath() + "/.dongji/dongjiMarket/backup/"; public static boolean checkBackupApkIsExist(String apkName) { boolean isExist = false; File directory = new File(BACKUPPATH); if (directory.exists()) { File[] files = directory.listFiles(); for (int i = 0; i < files.length; i++) { String tempName = files[i].getName(); tempName = tempName.substring(0, tempName.length() - 4); if (tempName.equals(apkName)) { isExist = true; break; } } } return isExist; } }