>>* The <delete> task has an annoying feature of generating an error and
>>stopping when you try to delete a file or a directory which is not there.
>>For instance, a typical <clean> target might look like this:

>you can solve this by setting the failonerror attribute of the delete task 
>to false:
><delete dir="c:\unexistingdir" failonerror="false"/>

This doesn't handle the case where the file is locked by another process and
you legitimately can't delete the file. Your build will succeed incorrectly.

You can do:
<available
        type="Directory"
        resource="c:\unexistingdir"
        property="available.unexistingdir"
        />
<delete
        dir="c:\unexistingdir"
        if="${available.unexistingdir}"
        />

Nick Varacalli



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

Reply via email to