ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject Re: ant execute Windows del command
Date Thu, 12 May 2011 18:55:47 GMT
On Thu, May 12, 2011 at 1:45 PM, shi chuan <> wrote:
> Hi guys, I am trying to apply a task using Windows executable 'del' to
> delete files, the reason I don't use <delete> is because it will delete even
> if things are up to date.
> However this runs into an error: cannot run program 'del'...error=2
> <apply executable="del" dest="./abc/" osfamily="windows"
> addsourcefile="false">

That's because 'del' is not a program, but a builtin 'cmd.exe' "Shell".

That's similar to why
uses 'cmd -c foo.bat'

Thus try <apply executable="cmd" ...> and add "-c del" as a command
line arg. --DD

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message