I am trying to copy files in remote serve to local using scp
task in ant
. The thing is, I want to exclude certain files with extension *.txt
, so I tried using excludes
tag. But it seems not to work. And It copies all the files including the files with extension *.txt
<scp file="username:pwd@remotemachine:/path/to/files/*" todir="copycontent" trust="true">
<fileset dir="files" >
<exclude name="**/*.txt"/>
</fileset>
</scp>