ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Krey <a.k...@gmx.de>
Subject Re: executable="/usr/bin/cp" cannot access PATH/*
Date Fri, 25 Apr 2014 10:52:06 GMT
On Fri, 25 Apr 2014 10:26:08 +0000, GARCIA PEREZ, Alberto (Alberto)** CTR ** wrote:
...
> I want to copy several file from one directory to another one. Just the files inside,
not the parent directory.
> I'm using the next code:
> 
> <exec executable="/usr/bin/cp" failonerror="true">
>                 <arg line="${workspaceView.DOCS }/*"/>
>                 <arg line="${workspaceView.PDFS}/"/>
> </exec>
> 
> The output is:
> cp: cannot access /hudson/.hudson/jobs/workspace/DOCS/*
> 
> Is it possible to use the (*) to copy several files as you can do by command line?

Not directly. The * expansion is done by the shell, not by /usr/bin/cp,
so either execute /bin/sh with arguments '-c' and 'cp ${from}/* ${to}'
(you do the math of translating into XML), or you directly use ant's
copy tasks.

Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message