Press Windows button + R and press cmd then click "OK".
Write down "below command" and press enter
Full path approach
echo exit | sqlplus hr/hr @C:\sql\example.sql
Oracle path approach
echo exit | sqlplus hr/hr @?/example.sql
? -> $ORACLE_HOME
Example sql: select * from employees;
Used Oracle Version and OS: Oracle XE and Win7
Write down "below command" and press enter
Full path approach
echo exit | sqlplus hr/hr @C:\sql\example.sql
Oracle path approach
echo exit | sqlplus hr/hr @?/example.sql
? -> $ORACLE_HOME
Example sql: select * from employees;
Used Oracle Version and OS: Oracle XE and Win7