ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russ Fink" <>
Subject Re: newbie - if-then-else task?
Date Thu, 01 Jan 1970 00:00:00 GMT
Okay - I think I understand.  If I have 'dirs.orig' pointing to the global 
area, and dirs.local pointing to the local modified area, and want to put 
the file into 'dest', I can do the following:

<property name="frompath" value="${dirs.orig}/foo"/>
<available file="${dirs.local}/foo" property="frompath"
<copy file="${frompath}" todir="${dirs.base}/dest"/>

The first line sets the default to the orig directory; the second line 
overrides the value of 'frompath' if there exists a file in the .local 
directory, and the last line does the copy with whatever the value of the 
variable happens to be.

(This is still a little more work than I indended, but I guess that's why 
there's Perl/Awk to add these lines into my customizations on build.xml.)

Thanks for the help,

Get your FREE download of MSN Explorer at

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message