Johnny
Johnny

Reputation: 1503

How to iterate a list of files and apply a command on each?

I have a folder with two files (a.exe and b.exe) in it and I need to run a command on each. For example xxx - a.exe a.bin. Is there a way to do this with Ant?

I want ant to run:

xxx - a.exe a.bin

and

xxx - b.exe b.bin

Upvotes: 5

Views: 2395

Answers (2)

ChrisH
ChrisH

Reputation: 4826

Use <apply>. Read more about it here.

Upvotes: 6

Leniel Maccaferri
Leniel Maccaferri

Reputation: 102418

Use <foreach> with a nested <FileSet>.

More info here.

Upvotes: 1

Related Questions