Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 56730 invoked from network); 11 Aug 2009 19:49:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Aug 2009 19:49:55 -0000 Received: (qmail 75242 invoked by uid 500); 11 Aug 2009 19:50:01 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 75195 invoked by uid 500); 11 Aug 2009 19:50:01 -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 75185 invoked by uid 99); 11 Aug 2009 19:50:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Aug 2009 19:50:01 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mgainty@hotmail.com designates 65.55.111.146 as permitted sender) Received: from [65.55.111.146] (HELO blu0-omc4-s7.blu0.hotmail.com) (65.55.111.146) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Aug 2009 19:49:49 +0000 Received: from BLU142-W10 ([65.55.111.137]) by blu0-omc4-s7.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 11 Aug 2009 12:49:28 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_a8de56c5-a20e-4fd7-8b82-e8b46a2ded0e_" X-Originating-IP: [71.184.169.190] From: Martin Gainty To: Ant Users List Subject: RE: Another options Date: Tue, 11 Aug 2009 15:49:28 -0400 Importance: Normal In-Reply-To: <7c55bf80908111157x553b4cf2sadeaa253b9d803c2@mail.gmail.com> 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> MIME-Version: 1.0 X-OriginalArrivalTime: 11 Aug 2009 19:49:28.0903 (UTC) FILETIME=[D68A1D70:01CA1ABC] X-Virus-Checked: Checked by ClamAV on apache.org --_a8de56c5-a20e-4fd7-8b82-e8b46a2ded0e_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable parce que je suis plus courant sur Java ou Javascript j'ai cod=E9 une solut= ion dans JS.=20 Ce que vous avez fourni est une solution bien meilleure pour la fourmi buil= d.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=2C nous te demandons avec bont=E9 que pour sat= isfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e= ou la copie de ceci est interdite. Ce message sert =E0 l'information seule= ment et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant d= onn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation= =2C nous ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni= . > Date: Tue=2C 11 Aug 2009 20:57:35 +0200 > Subject: Re: Another options > From: fge@one2team.com > To: user@ant.apache.org >=20 > On Tue=2C Aug 11=2C 2009 at 16:20=2C Redondo Gallardo=2C Raul > Maria wrote: > > Well=2C 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. Aft= er I must to copy all the files of this directory to another folder and lau= nch 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 prog= ram. > > > > When I use fileset=2C I obtain: > > C:\Work\folder10\folder20\filev2.txt=3B 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=2C the step number 4 I have solve= d=2C but the steps 1=2C 2 and 3=2C I've no idea if is it possible to do wit= h 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=2C tell me=2C becaus= e the steps are not fixed=2C they are the way which I think would be a solu= tion=2C but it's possible that I'm wrong. > > >=20 > It is possible=2C either with or without the split. Here is a solution > without the split=2C which makes use of ant-contrib (yes=2C I just cannot > work without it=2C it's too powerful to be ignored imho). Of course=2C > you'll have to adapt it to what your script expects as an argument=2C > whether the build should fail if the script fails=2C etc (and note that > ant-contrib also has try/catch). >=20 > Note that while looks great=2C it has a huge drawback: its > output is a property=2C and properties are immutable. At least=2C they're > immutable with ant 1.6.x=2C 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=2C e-mail: user-unsubscribe@ant.apache.org > For additional commands=2C 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=3DPID233= 91::T:WLMTAGL:ON:WL:en-US:WM_HYGN_express:082009= --_a8de56c5-a20e-4fd7-8b82-e8b46a2ded0e_--