@echo off
if exist f01 goto err1
if exist f25 goto err2
%dvdir%\object\d4h14n.exe
copy %dvdir%\data\d4h14 f25
call %dvdir%\exec\makef05scfs
call %dvdir%\exec\existf05
if exist F05exist.txt goto fexist
goto err3
:fexist
del F05exist.txt
goto scatrun
:scatrun
call %dvdir%\exec\dvscat
if exist converge.bat goto del1
goto cont1
:del1
del converge.bat
goto cont1
:cont1
if exist convd.txt goto del2
goto cont2
:del2
del convd.txt
goto cont2
:cont2
if exist notconv.txt goto del3
goto cont3
:del3
del notconv.txt
goto cont3
:cont3
call %dvdir%\exec\cnvchk150
call converge.bat
if exist convd.txt goto cont4
if exist notconv.txt goto cont4
del converge.bat
goto scatrun
:cont4
del converge.bat
call %dvdir%\exec\contrdall
dir/w *.sca
call %dvdir%\exec\netc
call %dvdir%\exec\bndodr
call %dvdir%\exec\popanls
rename F08P F08P_S
call %dvdir%\exec\popanl
call %dvdir%\exec\atlist >atlist.out
call %dvdir%\exec\bllist >bllist.out
call %dvdir%\exec\prests
call %dvdir%\exec\wavnum <%dvdir%\data\zero
call %dvdir%\exec\makel04 <%dvdir%\data\three
call %dvdir%\exec\lvlshm
call %dvdir%\exec\hlgap
call %dvdir%\exec\hlgaps
type i08
type f08e
if exist notconv.txt goto notconv
del convd.txt
goto end
:notconv
echo;
echo ***********************************************************
echo *** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ***
echo ***********************************************************
echo ***  SCAT (NonSpin version) has not been converged yet. ***
echo ***********************************************************
echo *** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ***
echo ***********************************************************
del notconv.txt
goto end
:err1
echo ***ERROR*** f01 already exist
goto end
:err2
echo ***ERROR*** f25 already exist
goto end
:err3
echo ***ERROR*** F05 not exist
goto end
:end
