locked
Batch file, help me RRS feed

  • Question

  • Can i use >,< in batch file?

    I mean:

    set /p "a=>>"

    set /p "b=>>"

    if %a%>%b% goto ..

    if %a%<%b% goto ...

    or something like that?

    Saturday, June 24, 2017 12:47 PM

Answers

  • If you are asking if you can use the character < to mean "less than" and the character ">" to mean "greater than" with the cmd.exe if statement, the answer is no.

    To get the answer to your question, type the following command at the cmd.exe command prompt and read the information presented:


    if /?


    -- Bill Stewart [Bill_Stewart]

    • Marked as answer by Bill_Stewart Wednesday, July 26, 2017 7:47 PM
    Saturday, June 24, 2017 6:16 PM