I am writing a short batch file, that I will run from the command window, that goes through all the subfolders that start with a sequence ("01" in my case) and runs a .exe file located in each folder.
@echo off
CD "C:\Users\Acuna\Desktop\simulations"
for /D /r %%d in ("01*") do (
pushd "%%d"
start "" /wait hydro_2dm.exe
popd
)
The problem I am having is that when I run the .exe file (which runs well with the code) in the last line it asks me to press enter to continue and exit the process, and I have not been able to emulate this from a batch file. I search in several forums and they recommend this line when calling the .exe
echo yes | call hydro_2dm.exe
but it didn't work. Does anyone have a suggestion on how to solve that problem?
Thank you in advance!