Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 68938 invoked from network); 30 Apr 2002 19:26:03 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 30 Apr 2002 19:26:03 -0000 Received: (qmail 20463 invoked by uid 97); 30 Apr 2002 19:26:01 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@nagoya.betaversion.org Received: (qmail 20375 invoked by alias); 30 Apr 2002 19:26:00 -0000 Delivered-To: jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 20361 invoked by uid 97); 30 Apr 2002 19:26:00 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 20329 invoked by uid 98); 30 Apr 2002 19:26:00 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <20020430192557.7205.qmail@web13405.mail.yahoo.com> Date: Tue, 30 Apr 2002 12:25:57 -0700 (PDT) From: Diane Holt Subject: RE: in .properties with Windows paths? (/ vs \\) To: Ant Users List In-Reply-To: <2B5C62C548D2FC48BC0334E8AE49418518E3A4@PARROT.demandtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --- Joshua Kneubuhl wrote: > How can I use to _change_ the value of ant properties? You don't -- you can't. My suggestion is to have your properties file(s) values that contain paths use foreslashes so you don't have to worry about things like backslashes getting swallowed or needing to be escaped to avoid that happening. To use to convert a path that's set in a property, you'd need to define a , referencing the property in the 's element. For example, if your have a property ${foo.path}, and it contains something like "D:/some/path/to/foo.exe" (note the foreslashes), and you reference that property in defining a datatype: the path defined by ( ID) foo.path will be D:\some\path\to\foo.exe, without your having had to do any 'ing at all. The same would be true if you had a property like: library.path=D:/lib:D:/usr/lib:D:/usr/local/lib and did: It would become D:\lib;D:\usr\lib;D:\usr\local\lib. Now, if you wanted to convert the above path to a Unix-style path, *then* you'd use , with 'targetos="unix"' and 'd to what you want. Of course, if you never want to do that kind of conversion, you don't even need to set 's for your path-type properties at all, if you're refencing the properties in attributes/elements that do the right thing with them (ie., convert them on-the-fly to what they should be for your current OS). For example, if you're referencing them in a element in a task, just reference the property (with foreslashes and all) and it'll be fine. Diane ===== (holtdl@yahoo.com) __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com -- To unsubscribe, e-mail: For additional commands, e-mail: