I need a Batch file that will help me backup my outlook pst files so I can schedule it to do the backup everyday at a particular time. I tried creating one but it wasnt successful. Please can anyone help me to write one that will run correctly.
Thanks.
Software/Hardware used:
ASKED:
April 3, 2008 11:18 AM
UPDATED:
September 25, 2008 10:21 AM
Will XCOPY fail if the end user forgets to close down Outlook? That’s a concern I have with my own situation (working in a research facility where people usually leave their machines running 24/7 while experiments are in progress).
I have been experimenting with using NTBackup on a schedule for the same thing, since it makes use of the Shadowcopy service.
This was the reference I am currently working on:
http://www.neurophys.wisc.edu/comp/blog/bb20070403_01.asp
Though I have not gotten around the fact that NTBackup actually launches even though it’s called from a batch file. I have yet to find a way to make this run invisibly to the user if they are present. (And sadly, many are present at strange hours.)
Thanks for your answer.
This is the file i created. After closing outlook, it just goes off, not doing anything.
taskkill /im outlook.exe
xcopy “C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Outlook\Outlook.pst” “Z:\outlook.pst /y
Does the user have the ability to copy to the Z: location? Can you manually copy the file using the same command? I would also add the /V switch to verify the file as it copies. /F may also be useful to ensure the correct filenames are displayed.
Your batchfile is missing a quote after the Z:\outlook.pst:
xcopy “C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Outlook\Outlook.pst” “Z:\outlook.pst“ /y
Lonewolf – that is an excellent reference! Thanks for sharing. As you suggest, the one thing that is missing is automatically shutting down the outlook.exe application. Jjjjjj has found a way to do that it seems. You can also consider using one of the Microsoft Sysinternals tools called pskill.exe to perform this task immediately before kicking off the backup script. Let us know how it works.
You could just use this tool: http://www.microsoft.com/downloads/details.aspx?FamilyID=8b081f3a-b7d0-4b16-b8af-5a6322f4fd01&displaylang=en
David
hi jjjjjjj
this batch didn’t work out coz their is a invalid parameters the xcopy cant support the space between the “Documents and Settings” so all you have to do is copy the outlook.pst to c:\outlook\ and create this batch file that i have gave you
——————————
taskkill /im outlook.exe
xcopy “C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Outlook\Outlook.pst” “Z:\outlook.pst /y
———————————–
this well work 1000% i have try it so good luck
@echo off
taskkill /f /t outlook.exe
echo Starting copy operation
cd C:\Outlook\Outlook.pst
xcopy *.* /s /e /y /c z:\Outlook\
echo Copy operation complete
pause > nul
sorry jjjjjjjjjjjj
i have to tell you must configured the outlook to the new location .
good luck :->