0
votes

I have an Ant task that FTPs all files in a specified directory, and it uses a fileset:

<fileset dir="${publicDirectory}">
  <include name="media/**/*" />
</fileset>

I have a file that contains all the files that I would like to include:

media/some/dir/1.txt
media/some/other/2.txt
...

How can I have the fileset read the file and only include whatever I've listed there?

1

1 Answers

1
votes

I've tried quite a few things, but nothing seems to be able to get around a basic issue: The <ftp> task works only on filesets and not other types of resources. I've tried various filterchains, but to no avail.

The best I could come up with was using the Ant-Contrib <for> or <foreach> task to loop through the file and then use an <exec> task to execute the command line version of ftp.