Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 54928 invoked from network); 12 Aug 2009 12:43:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Aug 2009 12:43:33 -0000 Received: (qmail 76613 invoked by uid 500); 12 Aug 2009 12:43:39 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 76530 invoked by uid 500); 12 Aug 2009 12:43:39 -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 76520 invoked by uid 99); 12 Aug 2009 12:43:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Aug 2009 12:43:39 +0000 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [213.170.46.15] (HELO mailhost3.indra.es) (213.170.46.15) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 12 Aug 2009 12:43:27 +0000 Received: from MADARRMAIL7.indra.es ([192.168.10.12]) by mailhost3.indra.es with Microsoft SMTPSVC(6.0.3790.3959); Wed, 12 Aug 2009 14:43:06 +0200 X-MIMEOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Another options Date: Wed, 12 Aug 2009 14:43:05 +0200 Message-ID: <6A0F3F60F99A9345BEE66A21F61F5E7686C576@MADARRMAIL7.indra.es> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Another options Thread-Index: AcoavOsVlncBmFHlRAGQbU5rkeAEugAjGpzg References: <6A0F3F60F99A9345BEE66A21F61F5E7686BC34@MADARRMAIL7.indra.es> <6A0F3F60F99A9345BEE66A21F61F5E7686C061@MADARRMAIL7.indra.es> <7c55bf80908110038q4a4d39bfxd8a1ce015bab6f5@mail.gmail.com> <6A0F3F60F99A9345BEE66A21F61F5E7686C0B3@MADARRMAIL7.indra.es> <7c55bf80908110657q6c0df571l25738466a222006a@mail.gmail.com> <6A0F3F60F99A9345BEE66A21F61F5E7686C20E@MADARRMAIL7.indra.es> <7c55bf80908111157x553b4cf2sadeaa253b9d803c2@mail.gmail.com> From: "Redondo Gallardo, Raul Maria" To: "Ant Users List" X-OriginalArrivalTime: 12 Aug 2009 12:43:06.0356 (UTC) FILETIME=[7090FB40:01CA1B4A] X-Virus-Checked: Checked by ClamAV on apache.org Thank you very much /muchas gracias, Francis and Martin I've trying the option of Francis but Appear and error and I can't find = what is the reason. When I try to run the application sais that there is a problem with the = for command, exactly sais: "failed to create task or type for". I've = been looking for the problem and don't find many data about "for with = dirset, but the link which I've found, seems to stay in the same way = which I've done. My code is the next. Where is the problem, seems to be right: Thank you very very much. Ra=FAl -----Mensaje original----- De: Martin Gainty [mailto:mgainty@hotmail.com]=20 Enviado el: martes, 11 de agosto de 2009 21:49 Para: Ant Users List Asunto: RE: Another options parce que je suis plus courant sur Java ou Javascript j'ai cod=E9 une = solution dans JS.=20 Ce que vous avez fourni est une solution bien meilleure pour la fourmi = build.xml Merci Monsieur Galiegue! Martin Gainty=20 ______________________________________________=20 Note de d=E9ni et de confidentialit=E9 Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous = n'=EAtes pas le destinataire pr=E9vu, nous te demandons avec bont=E9 que = pour satisfaire informez l'exp=E9diteur. N'importe quelle diffusion non = autoris=E9e ou la copie de ceci est interdite. Ce message sert =E0 = l'information seulement et n'aura pas n'importe quel effet l=E9galement = obligatoire. =C9tant donn=E9 que les email peuvent facilement =EAtre = sujets =E0 la manipulation, nous ne pouvons accepter aucune = responsabilit=E9 pour le contenu fourni. > Date: Tue, 11 Aug 2009 20:57:35 +0200 > Subject: Re: Another options > From: fge@one2team.com > To: user@ant.apache.org >=20 > On Tue, Aug 11, 2009 at 16:20, Redondo Gallardo, Raul > Maria wrote: > > Well, I'll try it: > > > > For example: In a main folder C: with different subfolders structure = I need to find the folder(s) which contain the file with name = filev2.txt. After I must to copy all the files of this directory to = another folder and launch a java program from ANT. Is this possible?. > > > > For example: > > > > It exist the structure of folders: > > C:\home\folder01\file.txt > > C:\home\folder01\file2.txt > > C:\Work\folder10\folder20\fileA.txt > > C:\Work\folder10\folder20\fileB.txt > > C:\Work\folder10\folder20\fileC.txt > > C:\Work\folder10\folder20\filev2.txt > > C:\Mom\folder40\folder50\fileA.txt > > C:\Mom\folder40\folder50\fileB.txt > > C:\Mom\folder40\folder50\filev2.txt > > C:\happy\file.txt > > > > I must to find in C: the folders which contains the file filev2.txt = and copy the files into the same folder to another path and launch a = java program. > > > > When I use fileset, I obtain: > > C:\Work\folder10\folder20\filev2.txt; = C:\Mom\folder40\folder50\filev2.txt > > > > With this I would want to do: > > 1.- Split the line in two (C:\Work\folder10\folder20\filev2.txt and > > C:\Mom\folder40\folder50\filev2.txt) > > > > 2.- Obtain the path of the first substring = (C:\Work\folder10\folder20) > > > > 3.- Copy the all the files which exists into this folder to = D:\process > > > > 4.- Launch a file .bat that works with this files > > > > > > These are the four steps which I need, the step number 4 I have = solved, but the steps 1, 2 and 3, I've no idea if is it possible to do = with ANT. > > > > > > > > Do you understand the example? Is it possible to do this? > > > > Thank you very very much. > > > > Best regards. > > > > PS: If you think that exist an easy way to do this, tell me, because = the steps are not fixed, they are the way which I think would be a = solution, but it's possible that I'm wrong. > > >=20 > It is possible, either with or without the split. Here is a solution > without the split, which makes use of ant-contrib (yes, I just cannot > work without it, it's too powerful to be ignored imho). Of course, > you'll have to adapt it to what your script expects as an argument, > whether the build should fail if the script fails, etc (and note that > ant-contrib also has try/catch). >=20 > Note that while looks great, it has a huge drawback: its > output is a property, and properties are immutable. At least, they're > immutable with ant 1.6.x, I don't know for ant 1.7.x. >=20 > > > > > > > > > > > > >=20 > > > > > > > > > > > > > >=20 > --=20 >=20 > Francis Galiegue > ONE2TEAM > Ing=E9nieur syst=E8me > Mob : +33 (0) 683 877 875 > Tel : +33 (0) 178 945 552 > fge@one2team.com > 40 avenue Raymond Poincar=E9 > 75116 Paris >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org >=20 _________________________________________________________________ Express your personality in color! Preview and select themes for = Hotmail=AE.=20 http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=3DPID2= 3391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_express:082009 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org