--- Russ Fink <[EMAIL PROTECTED]> wrote: > I tried the other way, using depends and targets. It is REALLY long, > not succinct,
Well, the way you did it is a bit more roundabout than you really need. For example (this one assumes the file is required): <target name="copyFile" depends="noFile"> <copy file="${filename}" todir="${dest.dir}"/> </target> <target name="chkLocal"> <available property="filename" value="${local.dir}/foo.txt" file="${local.dir}/foo.txt"/> </target> <target name="chkSys" depends="chkLocal" unless="filename"> <available property="filename" value="${sys.dir}/foo.txt" file="${sys.dir}/foo.txt"/> </target> <target name="noFile" depends="chkSys" unless="filename"> <echo message=" Error:"/> <echo message=" Couldn't find a foo.txt to copy..."/> <fail message="Exiting..."/> </target> > I would have potentially hundreds of files I want to copy, If where you copy from depends on whether the local directory exists (as opposed to checking for specific files in that directory), you can change the <available> to check for the directory -- just add the "type" attribute, set to "dir" (and adjust your property-setting and <copy> accordingly). > Digging in deeper, I strongly suggest supporting in-line Java calls, You can use <script>, or you can use in-house tasks. Diane ===== ([EMAIL PROTECTED]) __________________________________________________ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>