My first post to nant-users. Hello everyone. I think I've found a shortcoming in NAnt. It's not a new one, but I'd like to offer a new perspective and find out what's happening with this.
Searching for a solution to my problem, I came upon an interesting exchange between Gert Driesen and Ian MacLean at: http://www.mail-archive.com/[EMAIL PROTECTED]/msg01120.html As Gert points, out, NAnt's testing of boolean conditions works differently from Ant's. Ant considers anything that evaluates to an empty string to be "false", while anything other than an empty string is "true". NAnt is much more restrictive. So far as I can tell, it allows only boolean tests (which require the strings "true" and "false"). This appears to be true of both the "if" and "unless" attributes to tasks. The "if" task adds the capability of testing whether a property is defined. Unless I'm missing something, this means that in NAnt it's impossible to test the value of a property for anything other than the string "true" or the string "false". In my case, I want to execute a copy task if the file name is not empty, something like: <copy file="${filename}" todir="${destination.dir}" if="${filename}"/> where what I mean by 'if="${filename}"' is "if the file name is not an empty string". There appears to be no way to do this in NAnt. This would force me to carry two sets of properties around: one set with values in them, another set of true/false booleans saying whether the first set are empty or not. Yuck. Have I missed this and there is already a way to do this in NAnt? Bruce Fraser Sauder Industries Ltd Vancouver, Canada ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users