Batch File
Thanks.
Looking for relevant Microsoft Windows Whitepapers? Visit the SearchWinIT.com Research Library.
Lonewolfbw | Apr 3 2008 1:39PM GMT
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:
<a href="http://www.neurophys.wisc.edu/comp/blog/bb20070403_01.asp" rel="nofollow">http://www.neurophys.wisc.edu/comp/blog/bb20070403_01.asp</a>
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.)
Jjjjjjjj | Apr 3 2008 1:41PM GMT
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
Labnuke99 | Apr 3 2008 2:15PM GMT
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
Labnuke99 | Apr 3 2008 2:20PM GMT
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.
David Sengupta | Apr 4 2008 3:41AM GMT
You could just use this tool: <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=8b081f3a-b7d0-4b16-b8af-5a6322f4fd01&displaylang=en" rel="nofollow">http://www.microsoft.com/downloads/details.aspx?FamilyID=8b081f3a-b7d0-4b16-b8af-5a6322f4fd01&displaylang=en</a>
David