Hi,

if someone else runs into that ...

i just had another unpleasant experience with windows
pathdelimiter  ' \ ' in ant (usually i always write / instead
of \ , but in that special case)

I've set a property via antcontrib / timestampselector
and wrote it to a file to use it in another antscript later.
...
<path id="path.order">
            <fileset dir="${order.txt}">
                <include name="*.txt" />
            </fileset>
        </path>
        <timestampselector property="order.candidat"
                           pathref="path.order"
                           count="1"
                           age="eldest">
        </timestampselector>

        <echo
file="C:/cc_ant_workdir/temp.ordertxt">order.target=${order.candidat}</e
cho>
...
that writes 
order.target=C:/path/to/my/txtfile 
into temp.ordertxt

when using the property order.target via property file=temp.ordertxt
later the property get's expanded as =
C:pathtomytxtfile

Oops :-(  
behaviour as in java when \ has to be masked as \\

*** What's the reason for that ? ***

So i choosed a workaround via
<echo file="C:/cc_ant_workdir/temp.ordertxt">${order.candidat}</echo>
and later
<loadfile property="order.target"
srcfile="C:/cc_ant_workdir/temp.ordertxt">
        <filterchain>
                <replacestring from="\" to="/" />
        </filterchain>
</loadfile>

Gilbert

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to