ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott M Stark" <Scott_St...@displayscape.com>
Subject Getting the basename of a path element
Date Thu, 19 Apr 2001 00:05:28 GMT
I'm having a hard time replicating the behavior of the unix 'cp -r' command
given a path to a directory because I can't find a way to determine the
basename of the directory path. For example, this fragment:

<property name="etc.dir" value="/etc" />
<copy todir="/tmp">
  <fileset dir="${etc.dir}" />
</copy>

places a copy of the contents of /etc into /tmp rather than creating a /tmp/etc dir
with the same contents of /etc. Is there a way to do this without breaking the
to copy directory path into its parent path and basename?



Mime
View raw message