String path = "目标文件夹路径"; File file = new File(path); File[] listFiles = file.listFiles(); if(listFiles.length > 0){ //文件夹下有文件 } else { //文件夹下没有文件 }