batch freeze until file is closed

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
peterhall
Posts: 1
Joined: 09 Aug 2011 04:40

batch freeze until file is closed

#1 Post by peterhall » 09 Aug 2011 04:50

Hi guys.

I have a batch that runs everyday executing few php scripts and also 1 excel file. The problem is, when the batch calls the other batch to open the xls file e doesnt continue until the xls file is closed.
Is there a way for the batch continue after the xls is open?

The main batch:

D:\wamp\www\php\php5.3.5\php.exe D:\scripts\scrip1.php

sleep 15

D:\wamp\www\php\php5.3.5\php.exe D:\scripts\scrip2.php

sleep 15

call openexcel.bat

D:\wamp\www\php\php5.3.5\php.exe D:\scripts\scrip3.php

sleep 15

call closeExcel.bat

The open excel batch:

D:\file\file1.xls

The close Excel batch:


@echo off
taskkill /F /IM EXCEL.exe
cls

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: batch freeze until file is closed

#2 Post by Ed Dyreen » 09 Aug 2011 15:19

'

Code: Select all

@echo off
start "EXCEL" "EXCEL.exe" "D:\file\file1.xls"
start /?
pause
exit /b

Post Reply