import java.security.NoSuchAlgorithmException; import java.security.MessageDigest; import java.lang.reflect.*; import java.net.*; import java.io.*; import javax.swing.*; import java.util.regex.*; import java.util.*; import android.app.Activity; public class main { public static void main(String[] args) throws Exception { File dir = new File("/sdcard/Pictures/Screenshots"); System.out.println("Scanning: " + dir.getPath()); File[] list = dir.listFiles(); if (list == null) System.out.println("Could not list"); else for (File f : list) { if (f.isDirectory()) System.out.println("Directory found: " + f); else System.out.println("File found: " + f); } } }