Re: Utility to search for string in string
Don't know why. This works on the command line but when I put it in a
batch *.bat, the errorlevel is not changed. To be exact, it changes
the first time but when I run the batch from the command line again,
the errorlevel is stuck with the old errorlevel regardless of whatever
values I use to search.
Help ?
On Jul 27, 10:51 pm, flahmeshess <dingdongdingd...@yahoo.com> wrote:
> Thank you thank you thank you.....
>
> On Jul 27, 6:24 pm, "Pegasus \(MVP\)" <I....@fly.com> wrote:
>
>
>
> > "flahmeshess" <dingdongdingd...@yahoo.com> wrote in message
>
> >news:1185531036.768844.236450@z28g2000prd.googlegroups.com...
>
> > > In my batch, I want to search for a string in a environment variable,
> > > possible ? Any utility to do that ?
>
> > > eg.
>
> > > SearchStr %1 %bigstring%
>
> > > Is there any such Search utility that can search %1 in %bigstring% and
> > > return an errorlevel for subsequent steps ?
>
> > > Thanks very much.
>
> > Try this:
>
> > echo %bigstring% | find /i "%1"- Hide quoted text -
>
> - Show quoted text -