When trying to edit, delete, or move files, you may encounter the “The action cannot be completed because the file is open in another program” error. The error is shown when you’re trying to move or delete a file/folder, and means that Windows or another program is using the file(s) in question. It’s a very aggravating error than can be caused by a variety of reasons. This kind of error gives very little information about what the issue actually is, making it difficult for users to identify the cause and fix it.

Folder in use

The fix is different depending on what exactly is causing the issue. This report will go through the most common solutions and provide detailed instructions on how to fix the “The action cannot be completed because the file is open in another program” error.

Restart File Explorer

Restarting File Explorer is one of the easiest and quickest solutions to the “The action cannot be completed because the file is open in another program” issue. To restart File Explorer, you will need to use Task Manager.

1. To open Task Manager, click Ctrl + Alt + Del, and click Task Manager.
2. In Task Manager, find Windows Explorer in the list of processes, right-click on it and click “Restart”.

Task Manager

End certain processes

If the error you’re getting mentions a specific application, try terminating its process in Task Manager.

1. Open Task Manager (Ctrl + Alt + Del, click Task Manager).
2. Find the application in question and right-click on it.
3. Click “End task”.

Task Manager end process

This would completely close the application causing the issue, thus solving the error.

End COM Surrogate process

If the above solution did not solve the “The action cannot be completed because the file is open in another program” error, try ending the COM Surrogate process.

1. Open Task Manager (Ctrl + Alt + Del, click Task Manager).
2. Find the “COM Surrogate” process under the Processes tab.
3. Right-click on the process and click “End task”.

Remove Thumbnails using Disk Cleanup

Thumbnails can be the cause for the “The action cannot be completed because the file is open in another program” error. Thumbnail copies of all your pictures, videos, and documents are saved by Windows so that they can be loaded quickly when you open a folder. You can remove the thumbnails using Disk Cleanup. If this works for you, you can do this repeatedly whenever you encounter the “The action cannot be completed because the file is open in another program” error.

To run Disk Cleanup:

1. Search “disk cleanup” and click on it.

Disk cleanup search

2. Find “Thumbnails” under “Files to delete” and check the box.

Disk cleanup

3. Click “OK”.

Disable Thumbnails using File Explorer Options

1. Search “folder options” and click on Folder Options.

Folder options (search)

2. In Folder Options, open the View tab, find “Always show icons, never thumbnails” and check the box.

Folder options (always show icons)

3. Click “Apply”.

Disable Thumbnails using Performance Options

It’s also possible to disable thumbnails via Performance Options.

1. Search “advanced system settings”, and click on “View advanced system settings”.

Advanced system settings (search)

2. In the Advanced tab, click “Settings” under “Performance”.

System Properties

3. In Performance Options, find “Show thumbnails instead of icons” and uncheck its box.

Performance options

4. Click “Apply”, then “OK”.

Disable Thumbnails using Registry Editor

You can completely disable thumbnails in your Registry Editor. Bear in mind that you need to be very careful when using the Registry Editor because removing certain files could result in irreversible damage.

1. Search “Run” and click on the result.

Run (search)

2. In “Run”, type “regedit” and click OK.

Regedit

3. In Registry Editor, follow the path: “HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/Advanced “.
4. Find “IconsOnly” and double-click on it.

Registry Editor (1)

5. In the Edit DWORD Value window, type “1” under Value data to disable thumbnails.

Registry editor

6. Click “OK”.

Disable Preview Pane

If you have Preview Pane enabled, that may be one of the reasons for this error. If the above solutions have not worked, try the following:

1. Open File Explorer, click on the View tab, and then click “Preview pane” if it’s enabled.

Preview pane

Launch Folder Windows in a separate process

File Explorer opens windows in a single process unless set otherwise. If you’re getting the “The action cannot be completed because the file is open in another program” error, enabling File Explorer to open separate processes may fix it.

1. Open File Explorer, click on the View tab, and then click on Options.

Folder options

2. In the Folder Options window, click on the View tab.
3. Find “Launch folder windows in a separate process” and check its box.
4. Click “Apply”, then “OK”.

Remove Thumbs.db file command prompt

The thumbnail database (thumbs.db) stores thumbnail images for thumbnail view. If you’re getting the “The action cannot be completed because the file is open in another program” error, removing the thumbs.db file using Command Prompt may fix the issue.

1. Search “command prompt”, right-click on the result, and click “Run as administrator”.

Command Prompt (administrator)

2. In the Command Prompt window, type “del /ash /s thumbs.db” and press Enter.

Command Prompt 1

This will delete all thumbs.db from your drive.

Optimize Folders

If you get the “The action cannot be completed because the file is open in another program” error when trying to, for example, delete a folder containing videos, optimizing folders may fix the issue. Folders can be optimized by classifying them as pictures, videos, music, documents, etc.

1. Open the folder where the problematic file(s) is and right-click on the empty space.
2. Click “Properties”.

Folder properties (right-click)

3. In Properties, open the Customize tab.
4. Under “Optimize this folder for”, choose the appropriate option from the dropdown menu.
5. Check the box that says “Also apply this template to all subfolders”.

Folder properties

6. Click “Apply”, then “OK”.

Do a Clean boot

In case the “The action cannot be completed because the file is open in another program” error is caused by software conflict, try disabling programs from launching automatically upon startup. Programs that are set to start automatically are generally utility programs, anti-virus software, etc. It’s possible that one of your programs is clashing with another, so you should try to disable all automatic launching to see whether that fixes the error.

1. Search “system configuration” and click on the result.

System Configuarion (search)

2. In System Configuration, open the Services tab and mark the “Hide all Microsoft services” box.
3. Click “Disable all”.

System configuration (hide all)

4. Open the Startup tab, and click “Open Task Manager”.

System Configuration

5. In Task Manager, open the Start-up tab.
6. Right-click on each program and click “Disable”.

Disable process in start-up

7. Once you have disabled all programs, close Task Manager and click “OK” in the System Configuration Startup tab.
8. Restart your computer.

Empty your Recycle Bin

The easiest solution to try when encountering the “The action cannot be completed because the file is open in another program” error is to empty the recycle bin.

1. Right-click on the Recycle Bin icon and click “Empty Recycle Bin”.

Empty recycle bin

Leave a Reply