import java.io.File;
/**
* 判斷指定路徑的檔案是否存在
*/
public class IsFileExists {
/**
* @param args
*/
public static void main(String[] args) {
File file = new File("D://test//behind.rar");
if (file.exists()) {
System.out.println("檔案:" + file.getPath() + "|||||存在");
} else {
System.out.println("檔案:" + file.getPath() + "|||||不存在!");
}
}