Sorry for the belated response, but I just figured out an alternate syntax to do what you are trying to do, and thought other people might find it helpfull:
 
   <delete dir=".\${src.dir}" if="${directory::exists('.\$' + src.dir)}" failonerror="false" />
 
The point is that you can't nest ${...} properties but you CAN still concatonate strings in expressions, so '.\${src.dir}' becomes '.\$' + src.dir
 
Cheers-
 
-EAB


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of bleedledeep
Sent: Tuesday, March 15, 2005 3:06 PM
To: nant-users@lists.sourceforge.net
Subject: [Nant-users] How To Use Variable in delete if construct

I have the following line in my build file
 
   <delete dir=".\${src.dir}" if="${directory::exists('.\${src.dir}')}" failonerror="false" />
 
Using the variable ${src.dir} inside the exists() call does not work.  What is the syntax for using a variable inside the exists() function?

 


Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.

Reply via email to