The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

Batch file string parsing?

SeñorAmorSeñorAmor !!!Registered User regular
edited January 2009 in Help / Advice Forum
I'm unable to find a way to search for a string within a string in a batch file.

For example, I'm trying to see if '789' is in '1234567890'.

It appears my google-fu is weak because I cannot find what I am looking for. It seems that FIND and FINDSTR only look within files, which, unfortunately is not what I need.

What say you, PA? Are you a bad enough dude to help me out with this?

Thanks in advance.

SeñorAmor on

Posts

  • bowenbowen Sup? Registered User regular
    edited January 2009
    try:
    ECHO 123456789 | FIND /i "789"
    

    bowen on
    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
Sign In or Register to comment.