You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Andrew van Renen <av...@hotmail.com> on 2002/08/30 13:06:23 UTC
case inconsistencies on Windows file names
I ran into an inconsistency with the way case in file names is handled. I
had a file with an uppercase suffix (foo.XML), but in my build file I
refered to it as foo.xml.
I used zip to back it up, and then delete to remove it. The zip task could
not find it, but the delete/available tasks did (not an ideal combination,
as you can imagine).
What is the rule for case handling in Ant on Windows, and which of the 2
tasks is in error?
(The code looked like:
<available property="to.exists" file="${to}" type="file"/>
<antcall target="backup_file"/>
<delete file="${to}" quiet="true"/>
.
.
<target name="backup_file" if="to.exists">
<dirname property="to.path" file="${to}"/>
<basename property="to.filename" file="${to}"/>
<zip destfile="${backup_zip}" update="true" whenempty="create">
<fileset dir="${to.path}" includes="${to.filename}"/>
</zip>
.
.)
Andrew
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: case inconsistencies on Windows file names
Posted by Diane Holt <ho...@yahoo.com>.
--- Andrew van Renen <av...@hotmail.com> wrote:
> I ran into an inconsistency with the way case in file names is handled.
> I had a file with an uppercase suffix (foo.XML), but in my build file I
> refered to it as foo.xml.
<fileset> has a 'casesensitive' attribute you can use to turn off
case-sensitivity (it's on by default).
Diane
=====
(holtdl@yahoo.com)
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>