groovy

def urls =  ["ip1","ip2"]

userid = "user" 

password = "password" 

 

sfile = "c:/a.txt"

ant = new AntBuilder() 

 

urls.each { url ->

    ant.scp(file: "${sfile}", 

 todir: "${userid}@${url}:/appbak/", 

        password: "${password}", 

  trust:"true") 

}

 

 

你可能感兴趣的:(C++,c,ant,C#,groovy)