zoukankan      html  css  js  c++  java
  • Ant步步为营(2)在ftp上下载需要的文件

    早上好,开始一天工作之前先踩踩了园子,今天介绍ftp上下载文件。

    <?xml version="1.0"?>
        <project name="ForTest" default="ftp.download" >
        <property file="build.properties"></property>
            <target name= "ftp.download">
              <ftp action="get"
                     server="192.168.**.**"
                   userid="admin"
                   password="admin"
                     remotedir="/">
                <fileset dir="${file.dir}">
                      <include name="**"/>
                </fileset>
              </ftp>
            </target>
        </project>

    > <include name="**"/>此句是在ftp上筛选想要的文件。

    > action="get"这个需要声明,如果action不指定默认就是上传。

    > http://www.cnblogs.com/lightideal/archive/2012/02/27/2370210.html

    > Getting files from an FTP server works pretty much the same way as sending them does. The only difference is that the nested filesets use the remotedir attribute as the base directory for the files on the FTP server, and the dir attribute as the local directory to put the files into. The file structure from the FTP site is preserved on the local machine.(学习新知识,着手API,所有英语要过关)

  • 相关阅读:
    Eclipse Plugin for Hadoop
    Hadoop伪分布模式配置
    Hadoop单机模式配置
    20180711-Java Number类
    20180711-Java分支结构 – if…else/switch
    20180709-Java循环结构
    20180708-Java运算符
    20180708-Java修饰符
    20180708-Java变量类型
    20180705-Java对象和类
  • 原文地址:https://www.cnblogs.com/QAZLIU/p/3698560.html
Copyright © 2011-2022 走看看