ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dick, Brian E." <>
Subject RE: How do I filter a file of files
Date Wed, 31 Oct 2007 13:23:34 GMT
Let me state my problem, rather than my idea of a solution. Maybe that
will pique your interest.

I have a macrodef in my current build that uses the ftp task to get a
list of files from a remote server. The macrodef has attributes for
specifying the remotedir and patternset for the ftp task. Something like
the following.

<macrodef name="rls">
   <attribute name="remotedir"/>
   <attribute name="patternset"/>
      <ftp action="list"
         <fileset dir=".">
            <patternset refid="@{patternset}"/>

Our company is implementing a policy to allow only secure shell access
to our servers. I can't use the ftp task anymore. How can I achieve this
functionality using secure shell access within Ant?

-----Original Message-----
From: Dick, Brian E. 
Sent: Thursday, October 25, 2007 4:12 PM
To: Ant Users List
Subject: How do I filter a file of files

I have a file of files that I need to load into a property and filter
according to expressions similar to the "include" and "exclude" elements
of a patternset.

For example, assume I have a file, fof.dat, containing the following.


I would like code something like the following.

<patternset id="bin_files">
   <include name="bin/*"/>

<loadfile property="bin_file_list" srcFile="fof.dat">
      <filefilter dir="/export/home/myaccount/myapp">
         <patternset refid="bin_files"/>

After the loadfile task, the bin_file_list property would contain the


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message