Thanks for catching that.  It seems to be my error in the copy (not
a problem with mkdir).

I want to recursively copy all files and dirs below ${WORKDIR} to
BACKUP, except BACKUP itself.  This doesn't seem to exclude BACKUP:

      <mkdir       dir="${WORKDIR}/BACKUP" />
      <copy      todir="${WORKDIR}/BACKUP" preservelastmodified="true">
          <fileset dir="${WORKDIR}">
              <include name="**/*" />
              <exclude name="BACKUP" />
          </fileset>
      </copy>

-Doug

Ninju Bohra wrote:
The fact that you getting an additional BACKUP
directory created is very strange... I believe the
that contents of the ${WORKDIR} are different than you
believe...it seems un-believable that the <mkdir>
would create an additional level.

Later,

Ninju
--- Douglas Kramer <[EMAIL PROTECTED]> wrote:


I have this mkdir statement, but on Solaris, if
BACKUP already
exists, it creates a BACKUP directory inside of it:
BACKUP/BACKUP

      <mkdir dir="${WORKDIR}/BACKUP" />

I believe this creates a directory only if one
doesn't
exist.

   <target name="test">
       <available file="${WORKDIR}/BACKUP"
property="file.exists" value="true" />
   </target>

   <target name="makedir" depends="test"
unless="file.exists">
       <mkdir dir="${WORKDIR}/BACKUP" />
   </target>

Is there a simpler way to do it all in one task?

-Doug



---------------------------------------------------------------------

To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]







__________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to