Hi, I'm using the ant ftp task to ftp files from my local Windows 2003 Build Server to a remote Unix environment, and the issue I'm facing is the local folders(s) that contain the files that are to be ftp'ed don't always exist.... The folder(s) only get created if there are files in them that have been updated.... If there are no files that have been updated, my build process doesn't create the folder.... I would like to add an if-then statement to the target below, so it will ftp the files if the folder exists, or move on to the next target if the folder doesn't exist.... Can someone provide an example I could use, please...??? For the most part I have the target structured the way that I want it, but I don't want to execute the target if in one instance the folder doesn't exist, and it causes my deployment to fail.... And that's another question I have, will it actually cause my deployment to fail if I execute if as is below, or will attempt to execute then move on if it can't...??? Also, I'm using the <modified> selector on the fileset, so ant will keep track of changes made to the local copies of the files, so only the modified files will be selected for the ftp transfer. So, with that said, will I need the <modified> selector if I use an if-then statement...??? If someone can point me in the right direction I'd surely appreciate it...
<target name="lib-ext"> <ftp server="${remoteHostName}" userid="${remoteInstallUserId}" password="${remoteInstallPassword}" remotedir="${remoteAppFtpDir}" verbose="yes" binary="yes" action="put" chmod="644"> <fileset dir="${existingApp.dir}"> <include name="*.jar"/> <include name="*.properties"/> <include name="*.txt"/> <include name="*.xml"/> <include name="*.xsd"/> <modified> <param name="sunt.ext.cachefile" value="${tmpDir}/ftp-sunt-lib-ext-cache.properties"/> </modified> </fileset> </ftp> </target> Thanks Chris