Possible Duplicate:
Recursively create directory
What's the java-esque way to create a director(ies), and don't complain if it exist?
Quoting the man for mkdir
:
-p Create intermediate directories as required... with this option
specified, no error will be reported if a directory given as an
operand already exists.
Have you tried to read the documentation for java.io.File? The File#mkdirs()
does just what you need.