echo on
md AtenaCalculation

copy "AtenaResults.gidflavia.msh" ".\AtenaCalculation\AtenaResults.gidflavia.msh"
del "AtenaResults.gidflavia.msh"



IF EXIST "getResults.bat" GOTO getresults

:classic
copy "AtenaResults.inp" ".\AtenaCalculation\AtenaResults.inp"
del "AtenaResults.inp"
copy "run_import.bat" ".\AtenaCalculation\run_import.bat"
del "run_import.bat"
cd AtenaCalculation
start /wait %ComSpec% /c run_import.bat
cd..
GOTO next

:getresults
call getResults.bat
del getResults.bat
GOTO next

:next
cd AtenaCalculation
del AtenaResults.flavia.res
start /wait %ComSpec% /c %AtenaResults2GiD% /res AtenaResults.out AtenaResults.flavia.res
start /wait %ComSpec% /c %AtenaResults2GiD% /msh AtenaResults.msh AtenaResults.gidflavia.msh AtenaResults.flavia.msh
del AtenaResults.gidflavia.msh
del AtenaResults.msh
del run_import.bat


