Created
December 6, 2013 07:13
-
-
Save MangoLiu/7819792 to your computer and use it in GitHub Desktop.
Process each file in specified the floder.(遍历并处理指定文件夹下的每一个文件)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void floderProcesser() throws IOException { | |
//testfloder是一个文件夹,和.project文件在同一目录下。 | |
String path = "test"; | |
File f=new File(path); | |
File[] list=f.listFiles(); | |
int fileNum = list.length; | |
String name; | |
for(int i = 0;i<fileNum;i++){ | |
name = list[i].getName(); | |
System.out.println(name); | |
//some code.. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment