Working with particular file extension

Comments

1 comment

  • Avatar
    juanjo

    The <deleteFile>action supports patterns so you could just use the below code:

    <deleteFile>
      <path>${installdir}/*.zip</path>
    </deleteFile>
    

    The <unzip> action however does not support providing multiple files at once but you could use a <foreach> action:

    <foreach variables="zip">
       <values>"${installdir}/zip1.zip" "${installdir}/zip2.zip" "${installdir}/zip3.zip"</values>
       <actionList>
            <unzip>
               <destinationDirectory>${installdir}/content</destinationDirectory>
               <zipFile>${zip}</zipFile>
             </unzip>
       </actionList>
    </foreach>
    

    You could also include the deletion of the zip file inside the foreach.

Please sign in to leave a comment.