You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Oscar Farga <os...@mss.es> on 2002/12/13 20:49:48 UTC

FTP from an AS/400 machine

Hi,

 I'm having trouble trying to download some files with from an AS/400
server. The same script works with another FTP server with identical
configuration and the ftp server on the AS/400 is working correctly. If
I run ant in debug mode I can see it connects, changes to the folder but
I can't get files or list them. I tried with followsymlinks on the
fileset but then I get an exception when trying to access a folder named
"K". There is no "K" folder in the usr/mss folder but there's a "MK"
folder. Any ideas?

Thanks

Oscar

 

 

<project name="Euromadi" default="fase1" basedir=".">

 

            <property name="ftpuser" value="ftp"/>

            <property name="ftppasswd" value="ftp"/>

            <property name="hostname" value="emdas400"/>

            <property name="ftproot" value="/usr/mss"/>

                                               

            <target name="fase1" description="baixa els arxius de
l'ftp">

                        <ftp action="get" server="${hostname}"
userid="${ftpuser}" password="${ftppasswd}"  passive="no" verbose="yes" 

remotedir="${ftproot}" >

                                   <fileset dir="in"
followsymlinks="true">

                                               <include name="**" />

                                               

                                   </fileset>

                        </ftp>

                        

            </target>

</project> 

 

 

This is the output from ant -debug

 

fase1:

      [ftp] Opening FTP connection to emdas400

      [ftp] connected

      [ftp] logging in to FTP server

      [ftp] login succeeded

      [ftp] changing the remote directory

      [ftp] getting files

fileset: Setup scanner in dir E:\anttest\in with patternSet{ includes:
[**] excl

udes: [] }

      [ftp] transferring K/ to E:\anttest\in\K

      [ftp] disconnecting

 

BUILD FAILED

file:E:/anttest/build.xml:18: could not get file: 550  Unable to find
file /usr/

mss/K

 

        at
org.apache.tools.ant.taskdefs.optional.net.FTP.getFile(FTP.java:819)

        at
org.apache.tools.ant.taskdefs.optional.net.FTP.transferFiles(FTP.java

:517)

        at
org.apache.tools.ant.taskdefs.optional.net.FTP.transferFiles(FTP.java

:573)

        at
org.apache.tools.ant.taskdefs.optional.net.FTP.execute(FTP.java:977)

        at org.apache.tools.ant.Task.perform(Task.java:319)

        at org.apache.tools.ant.Target.execute(Target.java:309)

        at org.apache.tools.ant.Target.performTasks(Target.java:336)

        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)

        at
org.apache.tools.ant.Project.executeTargets(Project.java:1250)

        at org.apache.tools.ant.Main.runBuild(Main.java:610)

        at org.apache.tools.ant.Main.start(Main.java:196)

        at org.apache.tools.ant.Main.main(Main.java:235)

 

Total time: 4 seconds