You need to check the errorlevel after each call to SQL*Plus
@echo off
C:\oraclexe\app\oracle\product\10.2.0\server\BIN\sqlplus -s -l user/pass@localhost @E:\Oracle_Files\query.sql>E:\Oracle_Files\error.txt;
if errorlevel 1 (
goto error
)
C:\oraclexe\app\oracle\product\10.2.0\server\BIN\sqlplus -s -l user/pass@localhost @E:\Oracle_Files\query1.sql>>E:\Oracle_Files\error.txt
if errorlevel 1 (
goto error
)
:: no error, skip error message
goto end
:error
echo error occurred - check log file
:end