import java.io.File; /** list2 * lists all files+dir in top-level of input directory * Has better output than "list" */ public class main { public static void main(String[] args) { File[] files = new File("input").listFiles(); if (files == null) files = new File[0]; System.out.println("Meta: FileCount=" + files.length); for (File f : files) { System.out.println("File: " + f.getName()); } } }