public static void main(String[] args) { // This is the path where the file's name you want to take. String path = "D:\\workspace_spring\\S2SH\\WebContent\\WEB-INF\\lib"; getFile(path); } private static void getFile(String path) { // get file list where the path has File file = new File(path); // get the folder list File[] array = file.listFiles(); for (int i = 0; i < array.length; i++) { if (array[i].isFile()) { // only take file name System.out.println( array[i].getName()); // take file path and name // System.out.println(array[i]); // take file path and name // System.out.println(array[i].getPath()); } else if (array[i].isDirectory()) { getFile(array[i].getPath()); } } }
寒江独钓 2016-07-11
吟风 2016-04-01
吟风 2018-04-19
寒江独钓 2017-02-07
dingdongjs 2020-03-07
白诗秀儿 2018-04-25
白诗秀儿 2016-04-25
泡泡 2016-02-01
寒江独钓 2017-02-04
白诗秀儿 2016-02-03
藏家450 2025-04-01
Bonjour 2025-04-02
藏家187 2025-04-02
木槿花茶 2025-04-02
黄蜂 2025-04-02
圆油菜 2025-04-01
圆油菜 2025-04-01
求索 2025-04-01
藏家213 2025-04-01
帆高吃的饱 2025-04-01