ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject RE: FTP Question
Date Wed, 03 Jan 2001 17:44:58 GMT
Hmm... okay, reading the doc for the <ftp> task it seems that <fileset> is
actually using the "remotedir" attribute (set outside of the <fileset>,
which seems really weird/wrong) as the dir to find the files in, and the
"dir" attribute (inside the <fileset>) as the dir on the local machine to
put the files into. So (if you haven't already tried this), you might try
using:
<ftp
  ...
  remotedir="/home/images">
  <fileset dir="${coImages}">
    <include name="**"/>
  </fileset>
</ftp>
which should (if I'm reading the doc right) get all the files under your
remote /home/images directory and put them into your local ${coImages}
directory.

Diane

--- "Neal, Eddie" <Eddie.Neal@turner.com> wrote:
> I've tried this fix and it doesn't work.  Here is the updated target I
> tried:
> 
> 	<target name="getImages" depends="init">
> 		<echo message="building images file..."/>
> 		<mkdir dir="${coImages}"/>
> 		<echo message="Getting images..."/>
> 		<ftp action="get"
> 			verbose="yes"
> 			server="blah.blah.com"
> 			userid="xxxxx"
> 			password="yyyy"
> 			remotedir="/home/images/">
> 			<fileset dir="${coImages}/**"/>
> 		</ftp>
> 	</target><!-- end of get images target -->
> 
> When I run this target I get the error message:
> 
> D:\Work\CartoonOrbit\ant_related\build.xml:61:
> D:\Work\CartoonOrbit\ant_related\
> extract\CartoonOrbit\images\** not found.
> 
> When I run the target with <fileset dir="${coImages}"/>, the top level
> files
> are retrieved, however
> the subdirectories are not recursivley retrieved.  Is there anyway to do
> a
> "recursive get"?
> 
> thanks
> 
> Eddie Neal
> 
> -----Original Message-----
> From: Diane Holt [mailto:holtdl@yahoo.com]
> Sent: Friday, December 29, 2000 3:09 PM
> To: ant-user@jakarta.apache.org
> Subject: Re: FTP Question
> 
> 
> Can't say for sure, since I haven't tried it, but you might want to try
> only specifying <fileset dir="${coImages}/**"/>, since the documentation
> seems to suggest this will find all the files from the specified dir on
> down.
> 
> Also, just fyi -- you don't need to do a <mkdir> for every directory
> element, since the <mkdir> task works like 'mkdir -p' (uses mkdirs()).
> 
> Diane
> 
> --- "Neal, Eddie" <Eddie.Neal@turner.com> wrote:
> > I am trying to use the FTP task to move images files from a repository
> > to the web server.  The images directory contains several
> subdirectories
> > with images.  I want to recursively "get" everything in the repository
> > and copy to the web server. I am able to get the top level images
> files
> > but am not able to get the subdirectories.  Is it possible to
> > recursively get?   Here is the code I am trying:
> > 
> > 
> > 	<target name="getImages" depends="init">
> > 		<echo message="building images file..."/>
> > 		<mkdir dir="${coImages}"/>
> > 		<mkdir dir="${coImages}/Backgrounds"/>
> > 		<echo message="Getting images..."/>
> > 		<ftp action="get"
> > 			verbose="yes"
> > 			server="blah.blah.com"
> > 			userid="xxxxx"
> > 			password="yyyy"
> > 			remotedir="/home/images/">
> > 			<fileset dir="${coImages}"
> > 				includes="**/*"
> > 			/>
> > 		</ftp>
> > 	</target><!-- end of get images target -->
> > 
> > 
> > thanks
> > 
> > Eddie Neal
> 
> 
> =====
> (holtdl@yahoo.com)
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

Mime
View raw message