I wouldnt use a platform specific 'cp' command. Why dont you use <copy>?
<mkdir dir="${workspaceView.PDFS}"/> <copy todir="${workspaceView.PDFS}"> <fileset dir="${workspaceView.DOCS}" includes="**/*"/> </copy> Another point is that your '*' is not resolved by 'cp', this is resolved by the shell interpreter. Maybe this would work <exec executable="/usr/bin/sh" failonerror="true"> <arg value="cp"/> <arg line="${workspaceView.DOCS }/*"/> <arg line="${workspaceView.PDFS}/"/> </exec> Jan > -----Ursprüngliche Nachricht----- > Von: GARCIA PEREZ, Alberto (Alberto)** CTR ** > [mailto:alberto.garcia_pe...@alcatel-lucent.com] > Gesendet: Freitag, 25. April 2014 12:26 > An: user@ant.apache.org > Betreff: executable="/usr/bin/cp" cannot access PATH/* > > Hi all, > > I'm a new member of this mailing list. > I'm using ANT in a build.xml of a Hudson Job. > > 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? > > Regards > > Alberto García Pérez --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org