Why I Am Getting Error While Running a Bat File? : The code is as follows:
    @Echo off
    Set _File=SQLQuery.txt
    Set /a _Lines=0
    For /f %j in ('Type %_File%^|Find "" /v /c') Do Set /a _Lines=%j
    Echo %_File% has %_Lines% lines.


When I run as a bat file it gives me error as 'the syntax of the command is incorrect' .
And when I run all the above commands it runs successfully.
Why this is so?