Apache Ant Mkdir Task

This task is used to create a directory. It creates a new directory if directory is not present. It does not create directory if directory is already present.

This task uses the following attributes.

Apache Ant Mkdir Task Attributes

AttributeDescriptionRequired
dirthe directory to create.Yes

Apache Ant Mkdir Task Example

The above code will create a directory javatpoint in current project location.

Creating Nested Directory (Sub directory)

The above code will create a subdirectory java inside javatpoint directory.





Latest Courses