This program will create a directory to the given path.
Code:import java.io.File;
public class MakeDirectory {
public static void main(String[] args) {
File f = new File("c:\\MyFolder");
f.mkdir();
}
}
Printable View
This program will create a directory to the given path.
Code:import java.io.File;
public class MakeDirectory {
public static void main(String[] args) {
File f = new File("c:\\MyFolder");
f.mkdir();
}
}
This is great but I would be grateful if you could let me know if this can be automated.
I have a program that writes to a file, however when I build the project it deletes the dir that stores the file. So then the run fails because there is no dir, I then have to create the folder manually then run the application again within netbeans and everything works.
I suppose my question is there a way to get round this.
At the moment I have a seperate application that I run alongside my other 1 so it looks a little untidy.
Any suggestions?
Thanks in advance