• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 334
  • Last Modified:

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
0
bsharath
Asked:
bsharath
  • 6
  • 3
1 Solution
 
r-kCommented:
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.
0
 
zoofanCommented:
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
0
 
bsharathAuthor Commented:
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.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
bsharathAuthor Commented:
Any help...
0
 
r-kCommented:
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
0
 
bsharathAuthor Commented:
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.
0
 
r-kCommented:
Intertesting. That will be tricky with those requirements. I assume you want to do things from a remote machine. Here is one possible way:

(1) Check if Outlook is running on user's machine
(2) If it is running, then quit for now and try after a few hours.
(3) If it is not running, then copy the pst file.

In other words, copy the pst file only after first checking if Outlook is running. Killing Outlook and restarting is probably not realistic because it would start in a different state, e.g. at the password prompt, or a different mailbox.

At the same time, there are various laws that govern snooping on other people's mail, so you want to be sure this is legal by checking with your company's legal dept. Otherwise the person could sue the company for damages.

0
 
bsharathAuthor Commented:
Its informed by my CEO and its in our policy.
0
 
bsharathAuthor Commented:
Any way it is possible thge way i have mentioned....
0
 
bsharathAuthor Commented:
Any help... with this Q experts


Zoofan this Q is waiting for your answers :) Continuation of your other script...
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Q_22731874.html
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now