File srcPath = new File(srcPathStr); File destPath = new File(destPathStr); Files.walkFileTree(srcPath.toPath(), new CopyDirVisitor(srcPath.toPath(), destPath.toPath(), StandardCopyOption.REPLACE_EXISTING)); public static class CopyDirVisitor extends SimpleFileVisitor<Path> { private final Path fromPath; private final Pat