ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dhirendra Kulkarni" <dkulka...@ptc.com>
Subject Re: FTP
Date Thu, 11 Oct 2001 08:46:56 GMT
Thanks Peter,

 I tried with ur code, iam getting this error:

C:\ant\jakarta-ant-1.3\ftptest.xml:16: could not change remote directory:
550 Re
quested directory not found

iam using argosoft ftp server, i created ftptest directory under C:\Program
Files\ArGo Software Design\ArGoSoft FTP Server\ftptest. I had set home
directory c:\Temp inthe user properties if ftp server. Where iam going wrong
my xml is as below:

<?xml version="1.0"?>
<project name="ftpTest" basedir="." default="usage">

 <target name="upload" >
      <echo message="Uploading contents of C:\Temp to remote directory
           /ftptest on ftpserver"/>
      <ftp server="armada.ptc.com" remotedir="/ftptest" userid="wtadmin"
           password="wtadmin" binary="yes" action="put" verbose="yes">
           <fileset dir="C:\Temp">
              <include name="**/*.*"/>
           </fileset>
      </ftp>
  </target>

  <target name="usage" >
      <echo message="Usage: ant upload|download" />
  </target>

</project>

Thanks for the help
DK

----- Original Message -----
From: <Peter.FLYNN@syntegra.com>
To: <ant-user@jakarta.apache.org>
Sent: Thursday, October 11, 2001 5:05 PM
Subject: RE: FTP


> Dhirendra,
>
> I build this using the documentation provided in the 1.4 optional tasks
> documentation.
>
> Here is some XML that uploads and downloads to an FTP server.   I hope it
> helps you out.
>
> <?xml version="1.0"?>
> <project name="ftpTest" basedir="." default="usage">
>     <target name="upload">
>         <echo message="Uploading contents of C:\Temp to remote directory
> /ftptest on ftpserver"/>
>         <ftp server="ftpserver" remotedir="/ftptest" userid="guest"
> password="guest" binary="yes" action="put" verbose="yes">
>           <fileset dir="C:\Temp">
>                   <include name="**/*.*"/>
>               </fileset>
>         </ftp>
>     </target>
>
>     <target name="download">
>         <echo message="Downloading contents of remote directory /ftptest
on
> ftpserver to my current directory."/>
>         <ftp server="ftpserver" remotedir="/ftptest" userid="guest"
> password="guest" binary="yes" action="get" verbose="yes">
>           <fileset dir=".">
>                   <include name="**/*.*"/>
>               </fileset>
>         </ftp>
>     </target>
>
>     <target name="usage">
>         <echo message="Usage: ant upload|download" />
>     </target>
>
> </project>
>
> When run, you will receive the following output:
>
> D:\ftptest>ant
> Buildfile: build.xml
>
> usage:
>      [echo] Usage: ant upload|download
>
> BUILD SUCCESSFUL
>
> Total time: 1 second
>
> D:\ftptest>ant upload
> Buildfile: build.xml
>
> upload:
>      [echo] Uploading contents of C:\Temp to remote directory /ftptest on
> ftpserver
>       [ftp] sending files
>       [ftp] transferring C:\Temp\test.txt
>       [ftp] 1 files sent
>
> BUILD SUCCESSFUL
>
> Total time: 1 second
> D:\ftptest>ant download
> Buildfile: build.xml
>
> download:
>      [echo] Downloading contents of remote directory /ftptest on ftpserver
> to .
>       [ftp] getting files
>       [ftp] transferring test.txt to D:\ftptest\test.txt
>       [ftp] 1 files retrieved
>
> BUILD SUCCESSFUL
>
>
>
>
>
>
>
>
> ********************************************************************
>
> This email may contain information which is privileged or confidential. If
you are not the intended recipient of this email, please notify the sender
immediately and delete it without reading, copying, storing, forwarding or
disclosing its contents to any other person
> Thank you
>
> Check us out at http://www.syntegra.com
>
> ********************************************************************
>


Mime
View raw message