
Fix: The Action Can’t Be Completed Because the File Is Open in COM Surrogate
Trying to rename, move, or delete a media file on Windows, only to be blocked by this familiar popup?
“The action can’t be completed because the file is open in COM Surrogate. Close the file and try again.”
Don’t panic—this is a common glitch in both Windows 10 and Windows 11. It simply means a background Windows service (dllhost.exe) is still reading or generating a thumbnail preview for that file, locking it from being modified.
Here are the fastest, most reliable ways to unlock and delete your file.
What Causes the COM Surrogate Error?
COM Surrogate (dllhost.exe) is a legitimate background process Windows uses to handle software extensions and create thumbnails for videos, images, and documents in File Explorer.
When File Explorer freezes or takes too long to render a media file’s preview, the COM Surrogate process gets stuck holding onto that file. Because Windows locks active files by design, you cannot delete, move, or rename it until that handle is released.
Solution 1: Use PowerToys “File Locksmith” (Best & Easiest)
The cleanest, most precise tool for this problem is File Locksmith, an official Windows shell utility included in the free suite Microsoft PowerToys. It detects exactly what process is locking a specific file and terminates only that process without crashing File Explorer.
How to use File Locksmith:
- Ensure you have Microsoft PowerToys installed (available free on the Microsoft Store or GitHub).
- Right-click the locked file in File Explorer.
- Select Unlock with File Locksmith (on Windows 11, you may need to click Show more options first, or find it directly in the context menu).
- A window will appear showing which background tasks are locking the file (typically dllhost.exe).
- Click End Task next to the process.
- Delete or rename your file immediately.
Solution 2: End COM Surrogate via Task Manager
If you don’t have PowerToys installed, you can quickly close the background process using Task Manager:
- Press
Ctrl + Shift + Escto open Task Manager. - Go to the Processes tab.
- Look for COM Surrogate (or dllhost.exe under the Details tab).
- Right-click on it and select End Task.
- Return to your file and click Try Again on the error dialog.
(Note: If multiple COM Surrogate processes are running, end them one by one until the file releases.)
Solution 3: Restart Windows Explorer
Sometimes the entire File Explorer shell holds the lock. Restarting the shell usually clears lingering thumbnail extraction tasks:
- Press
Ctrl + Shift + Escto launch Task Manager. - In the Processes list, locate Windows Explorer.
- Right-click it and select Restart.
- Your taskbar and icons will flicker for a second, after which you can delete the file.
Solution 4: Restart Your PC
If all else fails, a classic system reboot is a foolproof fix. Restarting your computer flushes all active background handles, temp files, and cached processes, allowing you to delete the file immediately upon boot.
Summary
In most cases, the COM Surrogate lock occurs on video files (like .mp4 or .mkv) while File Explorer attempts to generate preview icons. Using File Locksmith from PowerToys remains the quickest, non-disruptive fix, but killing COM Surrogate in Task Manager works just as well in a pinch.
Have any questions or running into persistent errors? Drop a comment below!