Creating and deleting the directories from Ant Scripts.

text zoom

The following example will demonstrate the creation and deletion of the folders using the ANT scripts.


 


<?xml version="1.0"?>
  <project
name="Ant Tutorial" basedir="." default="create">


  <property name="build" location="c:/testingProject"/>
  <target
name="create" depends="delete">
    <mkdir dir="${build}"/>


  </target>


  <target name="delete">
    <delete
dir="${build}"/>


  </target>


</project>


 


Output:-


 


The following script when run first delete the folder c:/testingProject and then recreate the empty folder

                    

Copyright © 2012 VisualBuilder. All rights reserved