Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 34754 invoked from network); 15 Jul 2008 16:18:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jul 2008 16:18:54 -0000 Received: (qmail 88934 invoked by uid 500); 15 Jul 2008 16:18:51 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 88765 invoked by uid 500); 15 Jul 2008 16:18:50 -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 88754 invoked by uid 99); 15 Jul 2008 16:18:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jul 2008 09:18:50 -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 [206.190.58.150] (HELO web55101.mail.re4.yahoo.com) (206.190.58.150) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 15 Jul 2008 16:17:56 +0000 Received: (qmail 92060 invoked by uid 60001); 15 Jul 2008 16:17:19 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=CLy3VC7Pqx/RRWsc7Dk4Tshro4gXduC7Z3KxP96PpyJiODGuwmYOeZ4W4YKcHTZyCq4yZgElE21VI6avDDpQYUW/wvK+EJJqcf13uMdmchWckrR6K30i1WKDxcNX8pMLQxjXFA/RNqmaKOblnS9iiTFIfpZvi+Vni4B5p7vGu6Y=; X-YMail-OSG: F17qiFYVM1k.1iRzqpjvMy5jQcKxMG.EiS.ki3cu_.XEE0MUDdEr8kdYd8koc3OzeDfETGT_qg.znmssLddTuxyelmXP1Y9b4vto2fM47FyaJOUuZucWYu902a_BZVG2lw-- Received: from [12.68.231.140] by web55101.mail.re4.yahoo.com via HTTP; Tue, 15 Jul 2008 09:17:19 PDT Date: Tue, 15 Jul 2008 09:17:19 -0700 (PDT) From: Matt Benson Subject: Re: How can I pass each filename of a fileset to a macrodef? To: Ant Users List In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <336213.91539.qm@web55101.mail.re4.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org ant-contrib sounds like what you want. HTH, Matt --- Lars Monsees wrote: > Hi, > > I couldn�t find a better subject for describing the > problem that I have. It seems quite tricky to me... > > > I have a directory with multiple files of which I > don�t know the exact names like this: > > yo1234.order > yo1236.order > 8211_020_yo1234.pdf > 8211_040_yo1236.pdf > > 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: > > | > |-- 1234 > | | > | |-- yo1234.order > | |-- 8211_020_yo1234.pdf > | > |-- 1236 > | > |-- yo1236.order > |-- 8211_040_yo1236.pdf > > > I�ve 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. > > 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??? > > > Lars > > > > > > > > > > > > srcFile="${dir.source}/${todo}"> > > > value="${order.marker}"/> > > to=""/> > > > > > > > dir="${dir.source}/${DSTAMP}/${order.number}"/> > > > todir="${dir.source}/${DSTAMP}/${order.number}"> > > > > > > > > --------------------------------------------------------------------- > 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