Or A
Or A

Reputation: 1789

Move one folder up in nant script

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

Upvotes: 2

Views: 558

Answers (2)

Andrey
Andrey

Reputation: 60095

${svn.source.root.modified}\..\..\

Upvotes: 2

Peter Lillevold
Peter Lillevold

Reputation: 33940

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>

Upvotes: 1

Related Questions