日期:2014-05-20 浏览次数:20687 次
@echo off for /r . %%i in (xx) do ( echo %%i ) @echo on
------解决方案--------------------
public static void printFileName(String fileName){ String fName = "xx"; if(fileName != null){ File file = new File(fileName); if(file.isDirectory()){ if(fName.equalsIgnoreCase(file.getName())){ System.out.println(file.toString());//绝对路径 } File[] filelist = file.listFiles(); for(File f : filelist){ printFileName(f.toString()); } } } }