You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Redondo Gallardo, Raul Maria" <rm...@eservicios.indra.es> on 2009/08/07 09:39:43 UTC

Do several things with each record of a fileset

Good morning,

I've got a fileset and I want to extract the differents path for each elemente of the fileset and do several things. For example: for each element of the fileset I want:

1.- To know the path without the file name use like pattern.

2.- Extract the first folder name of the result of step 1

3.- Get the substring of step 1 without the first folder name

4.- Create in another unit the same structure of  folders of the step 3 and add at the end one new subfolder.

5.- Create a file in this last subfolder

6.- Pass to the next element of the fileset

 

Is it possible to do this? I know how to do the steps 4 and 5, but not the steps 1, 2, 3 and 6, Is it possible to do this steps with ANT or I must use anymore tool or option?

 

Thank you very much.

Best regards,

Raúl

 

 

 


AW: Do several things with each record of a fileset

Posted by Ja...@rzf.fin-nrw.de.
>I've got a fileset and I want to extract the differents path 
>for each elemente of the fileset and do several things. For 
>example: for each element of the fileset I want:


>
>1.- To know the path without the file name use like pattern.

<dirname> inside a <antcontrib:for> loop

maybe via a <pathconvert> and a mapper



>2.- Extract the first folder name of the result of step 1

<dirname>, <basename> inside the loop

or maybe via mapper



>3.- Get the substring of step 1 without the first folder name
>
>4.- Create in another unit the same structure of  folders of 
>the step 3 and add at the end one new subfolder.
>
>5.- Create a file in this last subfolder
>
>6.- Pass to the next element of the fileset
>
> 
>
>Is it possible to do this? I know how to do the steps 4 and 5, 
>but not the steps 1, 2, 3 and 6, Is it possible to do this 
>steps with ANT or I must use anymore tool or option?


Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org