• What I've found to be very handy when writing batch files like this is to have an option to get a reminder of what the batch does, and what parameters are to be expected (if any) and to ensure that you've remembered to set the internal values before running.  In your case, as no parameters are expected, if passed a ?, it could give instructions.  It usually takes the form of something like this:

    (at the very beginning of the batch file)
    if "%1"=="?" then GOTO :Instructions

    (near the end of the file, as the last line of functioning code)
    GOTO :EOF

    :Instructions
    ECHO.
    ECHO BatchSQL (no parameters)
    ECHO pathScripts = %pathScripts%, pathlogs=%pathlogs%
    ECHO.
    ECHO This batch will execute all .SQL scripts stored in %pathScripts% and output the results of the scripts in separate files within %pathlogs%.
    ECHO Note: If the pathScripts and pathlogs are incorrect above, they are set within the batch itself.
    ECHO.
    GOTO :EOF