In windows you have to do the foll to run a batch file:
put all the commands starting from connect internal into a sql script for eg: data.sql:
connect internal
select * from v$datafile;
exit;
and then run another batch script like :
%ORACLE_HOME%/bin/svrmgrl @data.sql

I think this will work.