When I attempted to copy an Outlook .ost file to an external USB flash drive, I saw the message below:
An unexpected error is keeping you from copying the file. If you continue to receive this error, you can use the error code to search for help with this problem.
Error 0x80070021: The process cannot access the file because another process has locked a portion of the file.
I didn't have Outlook open and didn't know what other process was using
the file. One way to find out which process has a lock on a file is to
use the
Process Explorer utility provided by Microsoft. The program is free and
you don't need administrator rights on a system to use it. To determine
a process that is using the file, you can hit the Ctrl and F
keys simultaneously, which will bring up a search box where you can type
the name of the relevant file. When you click on the Search button,
you should be able to see the name of the process that has a lock on the file
as well as the process ID (PID) for that process. E.g., in this case
I could see that lync.exe
was using the file.
[ More Info ]