How about first copying the files to a temporary directory and then scp'ing to the server and finally deleting then from tmp:
<mkdir dir="${java.io.tmpdir}/tmpsqls"/> <copy todir="${java.io.tmpdir}/tmpsqls" flatten="true"> <fileset dir="${user.home}/${source.dir}"> <include name="**/*.sql"/> </fileset> </copy> <scp todir="[EMAIL PROTECTED]:${target.dir}" keyfile="${user.home}/.ssh/id_dsa" passphrase=""> <fileset dir="${java.io.tmpdir}/tmpsqls"> <include name="**/*.sql"/> </fileset> </scp> <delete dir="${java.io.tmpdir}/tmpsqls"/> HTH Ivan --- Holger Rauch <[EMAIL PROTECTED]> wrote: > Hi! > > I'm using the scp task of Ant 1.6.2 in order to copy > some SQL scripts > which are stored in various directories on the > source system to > a target system. On the target system, I want all > .sql files to > appear below a single directory. How can I achieve > this if scp > doesn't support neither > > <flattenmapper /> > > nor > > <mapper type="flatten" /> ? > > Here's what I tried: > > <target name="ssh-multi-flat"> > <scp > todir="[EMAIL PROTECTED]:${target.dir}" > keyfile="${user.home}/.ssh/id_dsa" > passphrase=""> > <fileset dir="${user.home}/${source.dir}"> > <include name="**/*.sql"/> > </fileset> > <mapper type="flatten" /> > </scp> > </target> > > (I know the "mapper" element is wrong; if I omit it, > the stuff is copied to > the target system *including* the subdirs). > > Thanks in advance for any info! > > Kind regards, > > Holger > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]