Event in batch file?

  • Thread starter Thread starter jeff
  • Start date Start date
J

jeff

Hi all.

I want to have a simple batch file that opens QuickBooks, then FTP's
the QB data file to a server.

No big deal, but I want the FTP transfer to occur AFTER QuickBooks is
closed.
How do I trigger an event only when closing an application?

Thanks.
 
jeff said:
Hi all.

I want to have a simple batch file that opens QuickBooks, then FTP's
the QB data file to a server.

No big deal, but I want the FTP transfer to occur AFTER QuickBooks is
closed.
How do I trigger an event only when closing an application?

Thanks.

Some applications, when invoked in a batch file, will cause
the batch file to pause until the application is closed. Others
let the batch file continue immediately with the next line. I do
not know which class QuickBooks belongs to - you have to
try it for yourself. If the batch file continues immediately then
you can insert these lines to make it pause:

"c:\program files\QB\QuickBooks.exe"
:again
TaskList | find /i "xxxyyy" > nul || goto continue
ping localhost -n 60 > nul
goto again

:continue
ftp . . . .

Replace xxxyyy with the name of your QuickBook application
as shown in TaskList.exe.
 
Pegasus said:
Some applications, when invoked in a batch file, will cause
the batch file to pause until the application is closed. Others
let the batch file continue immediately with the next line. I do
not know which class QuickBooks belongs to - you have to
try it for yourself. If the batch file continues immediately then
you can insert these lines to make it pause:

"c:\program files\QB\QuickBooks.exe"
:again
TaskList | find /i "xxxyyy" > nul || goto continue
ping localhost -n 60 > nul
goto again

:continue
ftp . . . .

Replace xxxyyy with the name of your QuickBook application
as shown in TaskList.exe.

You are the MAN!!!
Thanks Pegasus!
 
Back
Top