Event in batch file?

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.

Reply to
jeff
Loading thread data ...

The QB SDK has a feature called UIEventSubscription. One of the events to which you can subscribe is CompanyFileEventOperation. Your application will receive notification when a company file is Opened and Closed.

If you don't have the SDK, get it at:

formatting link
There are forums there as well for SDK questions.

Reply to
klunk

More... obviously a batch file alone will not handle this. You will need to write an SDK capable application.

Reply to
klunk

QBFTP.BAT

(command to invoke QB) (command to invoke FTP) EXIT

Reply to
HeyBub

(command to invoke QB) (command to invoke FTP) cls echo Another fine job done by the kid. Pause EXIT

Reply to
Allan Martin

Unfortunately, QB does not behave as expected; the command following it in the batch file executes immediately, without regard to QB's state.

The answer, from another forum, provides the desired response (clearly thought through and tested before replying):

*******************************************************************************

"C:\Program Files\Intuit\QuickBooks 2006\QBW32PremierProfessional.exe" :again TaskList | find /i "qbw32.exe" > nul || goto continue goto again :continue ftp -s:"your script here" "FTP address here"

*******************************************************************************

Thanks.

Reply to
jeff

What kind of script is this? What type of file is it contained in?

Reply to
David Smith

*******************************************************************************

This is a simple batch file which:

Launches QuickBooks Monitors QB's status (whether open or closed), and When closed, launches the WIndows FTP client (which then calls a script of commands to run on the corresponding FTP Server)

Jeff

Reply to
jeff

*******************************************************************************

Jeff you did not answer the question. What kind of script is this? What type of file is it contained in?

It is certainly not a DOS batch file.

Reply to
David Smith

*******************************************************************************

Sure it is. What makes you thinks it's not a regular DOS batch file?

Reply to
pjhartman

*******************************************************************************

It is indeed. Have you even tried it?

Reply to
jeff

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.