You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Swathi Rao <sw...@gmail.com> on 2005/01/30 21:21:01 UTC

Problems with copying and renaming files

Hi,

I have some files which get generated as intermediate files while
running a process. However I need to use these files in the further
steps. But the names for the files are generated randomly...except for
the suffix and extension. I need to copy these files and rename them
before using them.

For ex: if the names of the files generated are 
xyz1.out
abc2.out

Then I need to copy these files and rename them to d1.out and
d2.out....However the <copy> file, Get, and Move task require the
exact name of the file to be specified. I also tried using mapper with
type set to glob. i.e.,

<mapper type="glob" from="*1.out" to="d1.out"/>

However doing so resulted the file to be renamed asd d1.outxyz1.out

Is there a better way of renaming files?

Thanks,
Swathi.

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