tags:

views:

27

answers:

2

Hi, i'm not an expert of Nant, so i'll have to ask this redicolus question.

i have a variable called svn.source.root which point to c:\folderA\FolderB\FolderC

how can i make svn.source.root.modified variable to point to 2 folders up? i.e, folderA

Obviously, the following didn't work:

please help.

thanks

+1  A: 
${svn.source.root.modified}\..\..\
Andrey
nope, this doesn't work either.....if i "Echo" the result, it doesn't show me the correct path.
Or A
this should work. when you "echo" you will get "c:\folderA\FolderB\FolderC\..\" but when you actually use the path it will work appropriately and point at FolderB.
jkohlhepp
@Or A is right. just use it.
Andrey
@Or A is absolutely right - this *doesn't* work. I didn't spot it at first, but lo and behold, her/his property syntax was wrong.
Peter Lillevold
A: 

Your problem is the property syntax. The $ must be in front of the {}:

<project default="test">

    <property name="svn" value="c:\users\peter" />

    <target name="test">
        <echo message="${svn}" />
        <echo message="${svn}\..\..\" />
        <echo message="${path::get-full-path(svn + '\..\..\')}" />
    </target>

</project>
Peter Lillevold