Hi all,

I have been using a macro definition to copy a set of files to different locations and FTP servers. But copying seems quite slow so I want to compress the bundle using 7z and copy all into FTP as one single file. Can it be done using 7z? My amcrodef is below which works:

<macrodef name="copyimages">   
<attribute name="todir"/>   
       <copy todir="@{todir}" overwrite="true" failonerror="false">       
           <fileset dir="${build.output.dir}">                   
              <include name="logs/*${build.id}*armv5*scan2.html"/>                   
              <include name="logs/*${build.id}*main.ant.log"/>         
              <include name="logs/*${build.id}*bom.xml"/>         
              <include name="logs/compile/*${build.id}*.*"/>         
              <include name="logs/cone/*${build.id}*.*"/>         
              <include name="logs/post/*${build.id}*.*"/>         
              <include name="logs/roms/*${build.id}*.*"/>         
              <include name="**/*${build.id}_codescanner/**"/>       
           </fileset>     </copy>   </sequential> </macrodef>   

<copyimages todir="${publish.ssdoci.dir}/${env.version}.${build.number}"/>
7 Years
Discussion Span
Last Post by Ezzaral

Ant has a built-in zip task that you could use, but if you want to use 7z instead then I would think you could do it pretty easily with exec.


Compression rate for ZIP is not good. So, I was thinking that 7z would help. But I could no how make it work.

Can anyone give some hints on Syntaxs' ?! pls


Use the exec task as you would the command line with 7z. Arguments are specified with the <arg> element.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.