Link to home
Start Free TrialLog in
Avatar of bsharath
bsharathFlag for India

asked on

Close outlook and rename pst and take a copy to the same folder.

Hi,

I want to copy a pst of a remote machine.So first if the outlook is opened need to close it.Copy the pst to the same folder and rename the pst to a different name and copy the different named folder to the location i want.After the copy is over i need to delete the pst automaticallyAll this in 1 script.

Regards
Sharath
Avatar of r-k
r-k

I would recommend doing this with NTBackup. It has the major advantage that it can backup the pst/ost files even if Outlook is running. The problem with killing Outlook is that you can never be sure if the user left something open, e.g. were they in the middle of composing a long message? It would be annoying if the backup program terminated things arbitrarily.

It is possible to include the Ntbackup command in a batch file and schedule it to run at a given time. The main restriction is you have to run the scheduled job on the machine with the pst/ost files. It cannot be run on the remote machine, though it can store the backed up file on the remote machine.
Are you just trying to copy users pst's to a server share?  I guess I dont understand the copy to new name, rename delete part of this.  

I can create a Logon script to do it which will resolve the worry of outlook being open and use the %username% envroment variable to name the new server copy pst, then move it to the server(users will need write/create permission to the share until all have been completed.  

Need the path to the pst as I umm..  dont have outlook  and also the path of the destination. Or I can script it allowing for the two paramters to be passed in the "parameters" box for the login script.  I know how you dislike parameters  :-).

zf
Avatar of bsharath

ASKER

I just need to backup some pst's of some specific machines.When the pst's are  open we cannot copy that's the reason i want the pst file to be that's outlook to close for a second and then copy >rename and copy to a destinatrion and open outlook back.
Any help...
I think you'll find this fairly tricky without NTBackup. I can send you some steps for that, but can you let me know if:
(a) You're willing to use NTbackup (rather than a copy or xcopy)
(b) You are able to schedule the job on the user's PC (i.e. it must run on the same PC that Outlook is installed on.)

Advantages of NTbackup are as mentioned above, i.e. no need to kill Outlook. Disadvantage is, you have to schedule on the same machine where Outlook data resides and the pst is saved in a "bkf" format file (i.e. you need NTbackup to get your data restored as well.

Speaking of killing Outlook, yes that can be done but there is a risk of terminating any partially composed email. I don't think restarting Outlook would help.

To answer zoofan's question, the default location of Outlook data files is:

 "C:\Documents and Settings\<username>\Local Settings\Application Data\Microsoft\Outlook"

but also see this link:
 http://email.about.com/cs/outlooktips/qt/et101002.htm
My main reason of doing this is to monitor mails that a user is receiving.We have been asked to monitor mails that a user has from past 3 months.
So the user should not know that we have copied there pst.
Sothat the reason i want these steps.
When outlook is open we cannot copy the pst.
So first need to close outlook then copy pst to the same folder as renamed it.Then copy the renamed pst to the mentioned location then open outlook back as it was.Then at last delete the renamed pst.
ASKER CERTIFIED SOLUTION
Avatar of r-k
r-k

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Its informed by my CEO and its in our policy.
Any way it is possible thge way i have mentioned....
Any help... with this Q experts


Zoofan this Q is waiting for your answers :) Continuation of your other script...
https://www.experts-exchange.com/questions/22731874/Terminal-server-Scripting.html