Ian,
 
Thanks for your response but i'm not quite there yet.
 
I see lots of nant tasks that support the "if" attribute, but I have a hard time finding documentation and/or examples on how to use it.
 
Then there's this page: http://nant.sourceforge.net/nightly/help/tasks/if.html that explains the "if" task. Not exactly what I am looking for since I want to use the "if" _attribute_.
However, it doesn't mention how to test a property for a certain value, which is what I want to do. The only examples are 'does propery exist?', 'does property equal true?' and some filesystem checks.
At the bottom of the page it says "Tests the value of a property using expressions." but the example is not there.
 
As for your proposed solution, I can't check it right now but I don't see how  "" can return true for ${mySwitch} being "on" and return false for any other va! lue.

-Jo


--------------------------------------------------------------------------------

take a look at the if attribute on . See the docs at:
http://nant.sourceforge.net/nightly/help/tasks/copy.html

somthing like :


....

 

Should do the trick
Ian


Jo De Greef wrote:

>Hi all,
>
>I'm trying to create a task that will copy my binaries to a seperate folder
>after compilation. I created a csv file with the list of files to copy and
>let Nant iterate through it.
>Depending on the value of a property however I want to decide whether or not
>to copy these files.
>
>I can't seem to find any documentation on how to do this exactly.
>
>Here's a snippet from my build file:
>
>
>
>>property="sourcePath,destinationPath,filename">
>
> >basedir="${string::replace(sourcePath,'[CONFIGURATION]', configuration)}">
>
>
>
>
>
>Can someone please tell me what the exact if-statement should look like or
>where I can find documentation for more info?
>
>TIA,
>-Jo
>
>ps. I know it's odd to perform the check inside the loop, but this will make
>sense when I extend th! e script later on.
>
>
>


--
Ian MacLean, Developer,
ActiveState, a division of Sophos
http://www.ActiveState.com

Reply via email to