getParentFile()
----------------------------------------------------
public static void main(String[] args) {
File f = new File("E:\\A\\A\\A\\ac.tt");
System.out.println("path 0 " + f.getParent());
File parent = f.getParentFile();
System.out.println("path 1 " + parent.getPath());
String path = parent.getPath();
System.out.println("path 2 " + path);
if (!parent.exists()) {
System.out.println("path 3 " + parent.getPath());
parent.mkdirs();
}
try {
f.createNewFile();
System.out.println("path 4 " + f);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}