ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tibor Strausz <Tibor.Stra...@tridion.com>
Subject RE: ant check if file is in path
Date Wed, 21 Aug 2002 09:24:57 GMT
<available filepath="${env.Path}"

is much beter :-)

example:
  <available filepath="${env.Path}" file="${regtlibExe}" type="file"
property="regtlibExe.present"/>
    <fail unless="regtlibExe.present" message="Tool regtlibExe not present;
regtlibExe: '${regtlibExe}'" />

> -----Original Message-----
> From: Steve Loughran [mailto:steve_l@iseran.com]
> Sent: Monday, August 19, 2002 6:02 PM
> To: Ant Users List
> Subject: Re: ant check if file is in path
> 
> 
> 
> ----- 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>
> 

--
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