So, 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. <project> <property name="remote-basedir" value="C:\Users\a042740"/> <sshexec host="ei0234vwin" username="${username}" password="${password}" trust="true" output="all-files.txt" command="dir ${remote-basedir} /b /s"> </sshexec> <pathconvert property="filtered.files" pathsep="${line.separator}"> <restrict xmlns:rsel="antlib:org.apache.tools.ant.types.resources.selectors"> <resourcelist> <file file="all-files.txt"/> </resourcelist> <or> <rsel:name name="${remote-basedir}\Favorites\*"/> <rsel:name name="${remote-basedir}\Documents\*"/> </or> </restrict> </pathconvert> <echo message="${filtered.files}" file="filter-files.txt"/> </project> Brian E. Dick | Principal Software Engineer Developer | FIDELITY INSTITUTIONAL 100 Salem Street Smithfield, RI 02917 401.292.6875 brian.d...@fmr.com > _____________________________________________ > 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: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org