Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 88467 invoked from network); 16 Jul 2008 09:21:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Jul 2008 09:21:16 -0000 Received: (qmail 26966 invoked by uid 500); 16 Jul 2008 09:21:12 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 26929 invoked by uid 500); 16 Jul 2008 09:21:12 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 26917 invoked by uid 99); 16 Jul 2008 09:21:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jul 2008 02:21:12 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [80.237.153.54] (HELO firebird.atlantisgmbh.de) (80.237.153.54) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jul 2008 09:20:16 +0000 Received: (qmail 8663 invoked from network); 16 Jul 2008 11:19:36 +0200 Received: from unknown (HELO LarsLaptop) (62.206.21.10) by firebird.atlantisgmbh.de with SMTP; 16 Jul 2008 11:19:36 +0200 From: "Lars Monsees" To: "'Ant Users List'" References: <336213.91539.qm@web55101.mail.re4.yahoo.com> Subject: RE: How can I pass each filename of a fileset to a macrodef? Date: Wed, 16 Jul 2008 11:19:38 +0200 Organization: atlantis GmbH Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcjmlnhtvpUGJvMvQgi0zTlP0NEitAAjmy5Q In-Reply-To: <336213.91539.qm@web55101.mail.re4.yahoo.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-Virus-Checked: Checked by ClamAV on apache.org Thx, that works fine =3D) Usage examples (I couldn=B4t find them in ant-contrib) are here: http://www.loribel.com/info/memento/ant.html (french) Lars > ant-contrib sounds like what you want. >=20 > HTH, > Matt >=20 > --- Lars Monsees wrote: >=20 >> Hi, >>=20 >> I couldn=B4t find a better subject for describing the >> problem that I have. It seems quite tricky to me... >>=20 >>=20 >> I have a directory with multiple files of which I >> don=B4t know the exact names like this: >>=20 >> yo1234.order >> yo1236.order >> 8211_020_yo1234.pdf >> 8211_040_yo1236.pdf >>=20 >> As you can see, there are pairs of files (.order and .pdf) with the >> id "yo....". I want to move each of these pairs into a sub-dir >> with the name of the id: >>=20 >> | >> |-- 1234 >> | | >> | |-- yo1234.order >> | |-- 8211_020_yo1234.pdf >> | >> |-- 1236 >> | >> |-- yo1236.order >> |-- 8211_040_yo1236.pdf >>=20 >>=20 >> I=B4ve got everything working when I enter the >> filename to use manually (s. property "todo" in XML below). >> I guess, I have to put all the actions into a >> macrodef and pass the filename as a parameter. >>=20 >> I would enumerate all the files in that dir with a >> fileset, but how can I go through that enum and pass >> each filename to the macrodef??? >>=20 >>=20 >> Lars >>=20 >>=20 >>=20 >> > folders"> >> >> >>=20 >> >> >>=20 >> > srcFile=3D"${dir.source}/${todo}"> >> >> >> > value=3D"${order.marker}"/> >> >> > to=3D""/> >> >> >> >> >>=20 >> >> > dir=3D"${dir.source}/${DSTAMP}/${order.number}"/> >>=20 >> >> > todir=3D"${dir.source}/${DSTAMP}/${order.number}"> >> >> >> >> >>=20 >> >>=20 >>=20 > --------------------------------------------------------------------- >> To unsubscribe, e-mail: >> user-unsubscribe@ant.apache.org >> For additional commands, e-mail: >> user-help@ant.apache.org >>=20 >>=20 >=20 >=20 >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org