Posted on 2008-10-18
Last Modified: 2013-12-01
Need help to: write a script that copies, and renames them to username_date_outlookarchive.pst and then copies them to a shared folder on the server so backup exec can grab them; configure to run  a script to delete the archives after backupexec is complete.
Question by:gabepcsolutions
  • 2
LVL 21

Accepted Solution

AmazingTech earned 500 total points
ID: 22753130
Who's going to run the script to copy the archives? Each user or an administrator?

On a user logoff script or user logon script you can run this batch file.
COPY "%UserProfile%\Application Data\Microsoft\Outlook\Outlook.pst" "\\Server\Share\Backup\%UserName%_%Date:/=.%_OutlookArchive.pst"

Open in new window


Author Comment

ID: 22753175
LVL 21

Expert Comment

ID: 22753186

The deleting part you'll have to get a script to run after backupexec.

DOS batch:
Del /q "\\server\share\backup\*.pst
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
File=WshShell.SpecialFolders("AppData") & "\Microsoft\Outlook\Outlook.Dat"
BackupFile=ServerFolder & "\" & WshShell.ExpandEnvironmentStrings("%UserName%") & "_" & Replace(Date,"/", ".") & "_OutlookArchive.PST"
wscript.echo "Source: " & File
wscript.echo "Target: " & BackupFile 
objFSO.CopyFile File, BackupFile
Set objFSO = Nothing
Set WshShell = Nothing

Open in new window


Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

VM backup deduplication is a method of reducing the amount of storage space needed to save VM backups. In most organizations, VMs contain many duplicate copies of data, such as VMs deployed from the same template, VMs with the same OS, or VMs that h…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question