public static void main(String args[]){
String oldPath="";
String newPath="";
try {
if (! (new File(pathOld).isDirectory())) {
new File(pathOld);
new File(pathOld + "//" + pathNew).mkdirs();
}
else {
new File(pathOld + "//" + pathNew).mkdirs();
}
}
catch (SecurityException e) {
System.out.println("can not create directory");
}
}