A file backup on any operating system, which includes outlook .pst files (personal folders) could show the following message:
[Error][New File] File=”C:\Users\User\outlook\.pst” error=”The process cannot access the file because another process has locked a portion of the file. “
The error is caused by outlook still being in operation. Outlook will lock any .pst files from being copied, even when shadow copy (server 2003,2008 or win Vista/7) is enabled. Users might forget to close outlook before leaving the office.
- Create the file closeoutlook.cmd by entering the following line in notepad:
TASKLIST | FIND “OUTLOOK.EXE”
if errorlevel 1 goto end
if errorlevel 0 taskkill /im outlook.exe /F
- Save the commands in a file called closeoutlook.cmd, in a folder/subfolder on your C: drive
- Open Backup-connect Online Backup Manager.
Go to the filebacktask which is causing the error.
Select the tab Command Line Tool.
At the Pre Commands click on the [Add] button.
Add the following lines (see example):
1. Name: Closeoutlook
2. Working Directory: C:\
3. Command: closeoutlook.cmd
- Click [Ok] and Save the backuptask.
Next time the backup runs, and outlook is still opened / running, our software will automatically close Outlook to unlock the outlook.pst file, allowing it to be backed up.
This solving problem sheet can only be used for OBM which contains a command line tool.