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. Thank you very much again. Raúl -----Mensaje original----- De: Francis GALIEGUE [mailto:f...@one2team.com] Enviado el: martes, 11 de agosto de 2009 15:57 Para: Ant Users List Asunto: Re: Another options On Tue, Aug 11, 2009 at 10:00, Redondo Gallardo, Raul Maria<rmredo...@eservicios.indra.es> wrote: > Hello Francis, > > Yes, you are right, but my problem (may be I'm express wrong) is that I don't > know exactly the structure folder and in spite of use de dirset option, I get > the searched folders with a Fileset and I want to split the result and > extract the path to move across the folders. > > I've looking for about this and I don't found anything and the tests which > I've done don't get it. > > Thank you very much and sorry. > Can you give an example? -- Francis Galiegue ONE2TEAM Ingénieur système Mob : +33 (0) 683 877 875 Tel : +33 (0) 178 945 552 f...@one2team.com 40 avenue Raymond Poincaré 75116 Paris --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org