• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

Batch file to close Quickbooks at X time so a backup can take place with a 3rd party backup application.

Recommended Posts

+warwagon    12,338

As much as I like Quickbooks (for what it is used for) it's missing a lot of useful and some might argue basic features.  Quickbooks has built into it, the ability to automatically backup your company at X time during the week. The catch is that you have to remember to log off your company in order to have it back up. 

 

You would THINK that the automatic backup would take it upon itself and close the company file and start the backup, NOPE!! 

You would also think they would give you an option to set a time to automatically log off the company file, NOPE! 

You would think they would have an option to tell QuickBooks to open the company selection screen on startup and not try to load the last company file opened, NOPE!

 

*Start off-topic rant* You would also think that when you open up an account in the accounts section in QuickBooks, right click and select "Make a deposit" that you ..oh I dunno WANT TO DEPOSIT THE MONEY INTO THAT ######## ACCOUNT!!" ..but nope, sometimes it selects an entirely different account for you that you then have to drop down and select the account you are currently in. I asked Quickbooks about it in which they pretty much said "You are depositing it wrong" ..you are suppose to right click the account in question in the account screen and select "Make depsosit" *End off-topic rant*

 

It's possible to create a backup yourself which backs up the entire folder containing your company file. When backing up inside QuickBooks it creates 1 single file which includes

 

Information from Statement Writer, CashFlow Projector, Business Planner, custom dictionary and Loan Manager.

 

I personally have Syncback pro setup as a nightly backup with versioning and about 14 of them. Every night it backs up to a network drive, USB drive and Online drive. It also emails me a log if the backup fails.  The issue is unless you log out of your company file the Qbw file does not change in a way the backup program thinks there is anything to backup. It won’t fail, it will run but it doesn't think there is anything to backup.

 

So yesterday I was looking for a way to auto close QuickBooks every night at 12 am. What I found was the command tasskill. The Name says kill but it will only force close can application if you use the /f command which I’m not using. I’m using

 

TASKkILL /IM qbw32.exe

 

/ IM is the same as hitting the X on the application. Once it’s closed I have Quickbooks open back up, and it gets as far as the company file password. That is just enough to change the company file so Syncback pro can back it up every night.  I'm not sure the automatic backup inside QuickBooks can backup while at the company file password screen. This is why is WISH there was an option to tell QuickBooks NOT to load the last company file but just go to the company file selection screen.

 

 

The actual batch file has the following

 

TASKkILL /IM qbw32.exe

TIMEOUT /T 20

cd C:\Program Files (x86)\Intuit\QuickBooks 2018\

QBW32Pro.exe

 

I'm using the 2018 version so if you have a different version you would want to change the version of your folder name. You save that to a notepad document and save it as a .bat file. Then tell the windows machine to run that file every night at X time. 

 

I also went into Quickbooks under backup file/ backup company file/options and unchecked “Remind me to backup when I close my company file”. It that prompt appears as the program is trying to close it will stop and wait for a mouse click.

 

Once a month or so I still do an actual backup from inside Quickbooks.

Share this post


Link to post
Share on other sites
Brandon H    2,267

if you don't want to use a batch file you could always set a task in the Windows Task Scheduler as well. Just another native option that's available for those that want it :)

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites
sc302    1,636

also works:

 

taskkill /fi "WindowTitle eq Quick*" /f /t

 

You could set to launch quickbooks after the job completes as a task to start after backup completes...most backups have the option to do so.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.