I created a simple bat file to start a program then copy files created in that program to a backup location when the program is closed. It works fine for 2 other programs, but for this one it is falling thru and copying the files as the program is opening.
outline of bat
============
program.exe
xcopy source to destination
====================
All the bat files are basically the same.
Process Explorer does in fact show the program opening then closing and xcopy running.
the program window remains on the screen for use.
Is there any way to make the bat file wait until the program window is closed before copying the files and closing???????
thx
simple execute and copy file issue
Moderator: DosItHelp
Re: simple execute and copy file issue
Normally your batch should wait if you run the program like you wrote.
There are two further ways you could try.
call program.exe
and
start "" /wait "program.exe"
Regards
aGerman
There are two further ways you could try.
call program.exe
and
start "" /wait "program.exe"
Regards
aGerman