Java Files create directories
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; public class Main { public static void main(String[] args) { Path directoriesPath = Paths.get("C:/home/test/subtest/subsubtest"); try {/*from w w w.j a v a 2 s . com*/ Path testDirectory = Files.createDirectories(directoriesPath); System.out.println("Directory sequence created successfully!"); } catch (IOException e) { System.out.println("IO Exception."); } } }