ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: ant check if file is in path
Date Mon, 19 Aug 2002 16:01:33 GMT

----- Original Message -----
From: "Tibor Strausz" <Tibor.Strausz@tridion.com>
To: "Ant Users List (E-mail)" <ant-user@jakarta.apache.org>
Sent: Monday, August 19, 2002 5:56 AM
Subject: ant check if file is in path


>
> how can i do an simple check if a file is in my path.
> if i use this
>
>   <property name="regtlibExe" value="regtlib.exe"/>
>   <available file="${regtlibExe}" type="file"
> property="regtlibExe.present"/>
>     <fail unless="regtlibExe.present" message="Tool regtlibExe not
present;
> regtlibExe: '${regtlibExe}'" />
>
> it will fail because it can't find it put the regtlib.exe is in my path

use <property  env > to get your env variables, then search for the file
along env.PATH and env.Path


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message