Download Files from FTP (Groovy ANT Task)


/ Published in: Groovy
Save to your folder(s)

This script will alow you to download files from a remote FTP


Copy this code and paste it in your HTML
  1. ant = new AntBuilder()
  2. ant.ftp( server:"ftp.foo.com",
  3. userid:"user",
  4. password:"passwd",
  5. passive:"yes",
  6. verbose:"yes",
  7. action:"get',
  8. remotedir:"/pub/incoming",
  9. binary:"yes" ) {
  10. fileset( dir:"." ) {
  11. include( name:"**/*.gz" )
  12.   }
  13.   }

URL: http://blog.hhhhq.org/2007/04/ftp-using-groovy-and-ant.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.