开发者

Move one folder up in nant script

开发者 https://www.devze.com 2022-12-28 19:18 出处:网络
i\'m not an expert of Nant, so i\'ll have t开发者_如何学Goo ask this redicolus question. i have a variable called svn.source.root which point to c:\\folderA\\FolderB\\FolderC

i'm not an expert of Nant, so i'll have t开发者_如何学Goo 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


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


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>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号