Try this: http://nant.sourceforge.net/nightly/help/fundamentals/expressions.html http://nant.sourceforge.net/nightly/help/fundamentals/functions.html
Jarek ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 13, 2004 10:20 PM Subject: RE: Re: Re: [Nant-users] Conditional copy > Jarek, > > Thank you for your quick response. I'll give it a try first thing tomorrow. > > I'd like to ask again however: is this documented anywhere? I don't quite have the time to trial & error every little thing in nant, which is why I resort to using the mailing list. Some clear examples/docs would help me tremendously, especially for trivial things like this. > > -Jo > > > > > > > How about this: > > > Jarek > > ----- Original Message ----- > From: > To: > Sent: Tuesday, April 13, 2004 9:58 PM > Subject: RE: Re: [Nant-users] Conditional copy > > > > 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 value. > > -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 the script later on. > > > > > > > > > > > > > -- > > Ian MacLean, Developer, > > ActiveState, a division of Sophos > > http://www.ActiveState.com ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users