ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dick, Brian E." <>
Subject RE: File list from remote server
Date Thu, 08 Jul 2010 14:43:39 GMT

I have it close. See my example below. 

The only issue is that we currently use a globally defined patternset
and reference it when we retrieve a remote file list. I can't figure out
how to replace the hardcoded selectors in the example with a reference
to a globally defined patternset, or something similar. Too bad the
restrict resource selector doesn't allow for that.

   <property name="remote-basedir" value="C:\Users\a042740"/>

   <sshexec host="ei0234vwin"
	command="dir ${remote-basedir} /b /s">

   <pathconvert property="filtered.files" pathsep="${line.separator}">
            <file file="all-files.txt"/>

            <rsel:name name="${remote-basedir}\Favorites\*"/>
            <rsel:name name="${remote-basedir}\Documents\*"/>

   <echo message="${filtered.files}" file="filter-files.txt"/>

Brian E. Dick | Principal Software Engineer Developer | FIDELITY

100 Salem Street
Smithfield, RI 02917

> _____________________________________________ 
> From: 	Dick, Brian E.  
> Sent:	Thursday, July 01, 2010 12:19 AM
> To:	Ant Users List
> Subject:	File list from remote server
> Hi,
> The ftp protocol is no longer allowed in our computing environment,
> because ftp uses clear text usernames/passwords. So, I have to rewrite
> our ant scripts to use the scp task rather than the ftp task. However,
> there are two attributes of the ftp task that I cannot seem to
> replicate with scp. First, we use depends="yes" to avoid transferring
> files that have not changed. Second, we use action="list" in
> conjunction with a fileset to get a filtered list of files from the
> remote server.
> Can anyone suggest how the function of these two ftp attributes can be
> replicated with scp or some other ant tasks?
> Later,
> Brian

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

View raw message