Help with .bat file

Soldato
Joined
7 Jan 2003
Posts
4,458
Location
Gold Coast, Australia
Hi Guys,

I would like to create a .bat file that runs when the user selects shutdown on the computer.

I would like the bat file to do the following.

-Close Microsoft Outlook 2010 (if it has been left open)
-Copy Outlook Data file from Location on C drive
-Paste Outlook Data file to Location on D drive (overwriting the file already there)
-Shutdown

Is this possible and if so would one of you mind explaining how I can do this and writing the code for me please?

Thanks in advance.
 
I'm probably wrong but I don't think a batch is going to help here. Once shutdown is selected, Windows will go about closing stuff down (Inc Outlook, if it's still running) and the will proceed to shutdown entirely. IIRC file copy procedures will just be cancelled, so your bat doesn't have the chance to finish.

Attacking this from a different angle, what are you looking to achieve? Just PST backup?

I am essentially looking to auto backup the PST file, the user isn't particularly the savvy and probably won't want to back it up manually.

It is a very small business and the user relies on their email for their orders etc. so having their entire email stored on one SSD isn't the best idea.

The reason I want it to happen when the computer is shutting down is because it needs to happen when outlook isn't in use.
 
Ah small business email, such fun. I guess they are using free POP accounts too, right?

They are using POP email but they are paying for web hosting and the company provides them with POP email.

Have a read here and see how far it gets you.

http://highaspirationsinc.com/webde...-automatically-backup-outlook-2010-pst-files/

Or push for them to shell out a whopping £3 /month /mailbox or whatever for hosted Exchange with a reputable firm

Excellent thanks for that, looks like what I am after I shall give it a go next time I am round there.
 
Back
Top Bottom