<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:[EMAIL PROTECTED]]
> 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" <[EMAIL PROTECTED]>
> To: "Ant Users List (E-mail)" <[EMAIL PROTECTED]>
> 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:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>