FacebookTwitterLinkedIn

The action cannot be completed because the file is open in another program

How To Fix 'The action cannot be completed because the file is open in another program' Problem In Windows 10?

When you try to rename, delete, or move a file or folder, you might receive the message “The action cannot be completed because the file is open in another program”. This error is not serious, but can be very annoying.

The message gives no information regarding the program that apparently has the file or folder open, and might be displayed even if you have closed programs that were previously accessing the file. This error message can be very frustrating if you are unable to move or delete the file or folder you are working with. Generally, this error message is generated when the folder or files within the folder are locked because they are being used by Windows or another program running in Windows.

The "The action cannot be completed because the file is open in another program" error message can cause many problems on computers, since it prevents access to, and removal of, certain files. This guide describes a number of possible ways to resolve this problem.

The action cannot be completed because the file is open in another program

Table of Contents:

Restart File Explorer

File Explorer (formerly known as Windows Explorer) displays the hierarchical structure of files, folders, and drives on the system. It also shows any network drives that have been mapped to drive letters on your computer. Using Windows Explorer, you can copy, move, rename, and search for files and folders. Restarting File Explorer might help you with this problem.

For this one, you will need to use Task Manager. Task manager is a system monitor program used to provide information about the processes and programs running on a computer, as well as the general status of the computer. Some implementations can also be used to terminate processes and programs, as well as change processes' priorities. To open Task Manager, press Ctrl + Alt + Delete on your keyboard or right-click the Start menu and select "Task Manager".

restart file explorer step 1

In Task Manager, scroll down to find "Windows Explorer", right-click on it and select "Restart" from the drop-down menu, or simply select it (by clicking it) and click "Restart" on the bottom-right corner. Restarting File Explorer (Windows Explorer) is one of the easiest solutions, but it is only temporary - "The action cannot be completed because the file is open in another program" problem might reoccur. Nevertheless, we recommend you to try this solution first.
restart file explorer step 2

[Back to Table of Contents]

Remove Thumbnails Using Disk Cleanup

"The action cannot be completed because the file is open in another program" error can be caused by thumbnails. Windows keeps a copy of all of your picture, video, and document thumbnails so they can be displayed quickly when you open a folder. If you delete these thumbnails, they will be automatically recreated when needed. You can fix this problem by removing thumbnails with Disk Cleanup. Disk Cleanup is used to reduce the number of unnecessary files on your drives, which can help your PC to run faster. It can delete temporary files and system files, empty the Recycle Bin, and remove a variety of other items that you might no longer need. These junk files may affect your computer’s processing speed, causing apps to respond slowly and can even prevent them from launching. To run Disk Cleanup, type "disk cleanup" in Search and click the "Disk Cleanup" result.

remove thumbnails using disk cleanup step 1

You will see a list of files to be deleted. Find "Thumbnails" and mark the checkbox near it. Click "OK". Disk Cleanup will remove thumbnails and other selected files. The problem should now be fixed. If it appears again, try to remove thumbnails using Disk Cleanup again.

remove thumbnails using disk cleanup step 2

[Back to Table of Contents]

Disable Thumbnails Using File Explorer Options

On Microsoft Windows operating systems this thumbnail cache is used to store thumbnail images for Windows Explorer's thumbnail view. This speeds up the display of images, as these smaller images do not need to be recalculated every time the user views the folder. Windows stores thumbnails of graphics files, and certain document and movie files, in the Thumbnail Cache file, including the following formats: JPEG, BMP, GIF, PNG, TIFF, AVI, PDF, PPTX, DOCX, HTML, and many others. You can disable thumbnails entirely by adjusting File Explorer options. Type "file options" in Search and click the "File Explorer Options" result to open it.

disable thumbnails using file explorer options step 1

Go to the "View" tab and check the "Always show icons, never thumbnails" checkbox. Click "Apply" and then "OK" to exit File Explorer Options and to save the changes.

disable thumbnails using file explorer options step 2

[Back to Table of Contents]

Disable Thumbnails Using Performance Options

You can also disable thumbnails by adjusting Performance options. Type "advanced system settings" in Search and click the "View advanced system settings" result to open it.

disable thumbnails using file performance options step 1

In the System Properties window under the "Advanced" tab, click "Settings...", this will open the Performance Options window.

disable thumbnails using file performance options step 2

In the Performance Options window, you will see a list of visual effects available on the Windows 10 operating system. Find "Show thumbnails instead of icons" and uncheck this option. Click "Apply" and then "OK" to save the changes. Check if the error message still appears.

disable thumbnails using file performance options step 3

[Back to Table of Contents]

Disable Thumbnails Using Registry Editor

Windows Registry, usually referred to as just the registry, is a collection of databases of configuration settings in Microsoft Windows operating systems. It is used to store much of the information and settings for software programs, hardware devices, user preferences, operating system configurations, and much more. Many of the options exposed in the registry are not accessible elsewhere in Windows. A wide variety of advanced settings can only be changed by directly editing the registry. Some other settings may be accessible through Group Policy – but the Group Policy editor is only included on Professional editions of Windows. The registry allows you to change most settings that can be accessed through Group Policy.

Note: Editing the registry is risky, and it can cause irreversible damage to your installation if you do not do it correctly.

We demonstrate how to disable Thumbnails on Windows 10, but this also applies to other versions of Windows. Open the Run dialog box by typing "run" in Search and click the "Run" result.

disable thumbnails using registry editor step 1

In the Run dialog box, type "regedit" and click "OK" to open Registry Editor.

disable thumbnails using registry editor step 2

In Registry Editor, follow this path: "HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/Advanced" on the left pane. When reach the "Advanced" key, you will see the list "REG_DWORD" and other files. Find the one named "IconsOnly" and double click on it.

disable thumbnails using registry editor step 3

In the Edit DWORD (32-bit) Value window, enter 1 under "Value data:" to show icons, or 0 to show thumbnails. If you want to disable thumbnails, enter 1 and click "OK" to save the changes.

disable thumbnails using registry editor step 4

[Back to Table of Contents]

Disable Preview Pane

On Windows 10 File Explorer you can enable or disable a Preview pane that is shown on the right side of the window. As the name implies, you can use it to preview the contents of certain types of files. If you select an image file in File Explorer, you can see a preview, and if you select a text file, you can also preview its contents, and so on. Disabling the Preview pane might help to fix "The action cannot be completed because the file is open in another program", since an enabled Preview pane is sometimes is the reason for this error. To disable Preview pane, go to File Explorer by clicking the icon in the taskbar. Alternatively, press Windows Key + E on your keyboard. In File Explorer, go to the "View" tab and disable "Preview pane" if it is enabled (it is enabled if selected, and disabled if not). You can also use the Alt + P keyboard shortcut to enable or disable Preview pane.

disable preview pane [Back to Table of Contents]

Launch Folder Windows In A Separate Process

By default, File Explorer opens windows in a single process. Enabling Explorer to open separate processes for the file browser can improve the stability of the Explorer shell, and this method might help to fix the "The action cannot be completed because the file is open in another program" error. To make Windows File Explorer launch folder windows in a separate process, go to File Explorer by clicking the icon in the taskbar or using a Windows Key + E keyboard shortcut. Once File Explorer is open, click "View" tab and Chen click on "Options". This will open the Folder Options window.

launch folder windows in a separate process step 1

In the Folder Options window, go to the "View" tab and find "Launch folder windows in a separate process". Check it and then click "Apply" and "OK" to save the changes.

launch folder windows in a separate process step 2

After making these changes, all folders will open as separate processes, which should resolve problems with the error message.

[Back to Table of Contents]

End Problematic Process

If the error message specifies that a particular application is using the file or folder, try terminating its process using Task Manager. Open Task Manager by pressing Ctrl + Alt + Delete or Ctrl + Shift + Esc on your keyboard or right-click the Start menu and select "Task Manager". Find the program, right-click on it and select "End task" from the drop-down menu. This will end the process and the problem should be fixed.

end problematic process

[Back to Table of Contents]

End COM Surrogate Process

The Microsoft Component Object Model (COM) is a platform-independent, distributed, object-oriented system for creating binary software components that can interact. COM specifies an object model and programming requirements that enable COM objects to interact with other objects. These objects can be within a single process, in other processes, and can even be on remote computers. Sometimes ending the COM Surrogate process helps to fix the “The action cannot be completed because the file is open in another program” error. To end this process, go to Task Manager by pressing Ctrl + Alt + Delete or Ctrl + Shift + Esc on your keyboard or right-click the Start menu and select "Task Manager". Under the "Processes" tab list, find "COM Surrogate" and right-click it, and then select "End Task".

end com surrogate process

[Back to Table of Contents]

Update Your .NET Framework

The .NET Framework is a software development framework from Microsoft. It provides a controlled programming environment where software can be developed, installed and executed on Windows-based operating systems. Many Windows applications .NET Framework and this problem can occur if you do not have the required .NET Framework installed on your computer. You can download it free from Microsoft's webpage here. Check if installing the latest .NET Framework helps you to solve this problem.

[Back to Table of Contents]

Remove Thumbs.db File Using Command Prompt

As mentioned before, the thumbs.db (thumbnail database) or thumbnail cache is used to store thumbnail images for Windows Explorer's thumbnail view. To fix the “The action cannot be completed because the file is open in another program” error, remove the thumbs.db file using Command Prompt. Command Prompt is the input field in a text-based user interface screen, a command line interpreter application available in most Windows operating systems. It is used to execute entered commands. Most of the commands are used to automate tasks through scripts and batch files, perform advanced administrative functions, troubleshoot and solve certain types of Windows issues. To open Command Prompt, type "command prompt" in Search and right-click the "Command Prompt" result. Select "Run as administrator" from the drop-down menu to run it with administrator privileges.

remove thumbs.db file using command prompt step 1

You need to switch to the desired drive in order to remove thumbs.db file. Type in your drive's letter, for example "C:" and press Enter. If you have only one partition on your computer, then it should be set automatically. Now type in the "del /ash /s thumbs.db" command and press Enter on your keyboard to execute this command. It will delete all thumbs.db files from your drive. If you have more than one partition, switch to another one and repeat these steps until you delete thumbs.db files from all drives. If the problem with files and folders occurs only on a certain partition, then there is no need to switch between partitions.

remove thumbs.db file using command prompt step 2

[Back to Table of Contents]

Optimize Folders

You can optimize any folder for given types of templates: general items, documents, pictures, videos and music. The advantage of optimizing a folder based on a template is that when you are working with these folders, you have specific options based on the type of folder in the pane. If it is a Music folder, the “Play All” option is provided, and if it is a Pictures folder, then a “Slide Show” option is provided, and so on. If you experience this error while deleting a video folder/s for example, then using the "Optimize this folder for" option might help to fix the error. To optimize a folder, go to the specific folder where your problematic files are stored and right-click on the empty space. Then, select "Properties" from the drop-down menu.

optimize folders step 1

In the folder's properties window, go to "Customize" tab. Under "Optimize this folder for:", select the option that suits best. Check the "Also apply this template to all subfolders" checkbox. Click "Apply" and "OK" to save changes. If there is more than more folder containing problematic files, repeat the steps and apply your preferred options to them.

optimize folders step 2

[Back to Table of Contents]

Perform A Clean Boot

When you start Windows by using a normal startup operation, several applications and services start automatically, and then run in the background. These programs include basic system processes, antivirus software, system utility applications, and other software that has been previously installed. These applications and services can cause software conflicts. A clean boot is performed to start Windows by using a minimal set of drivers and startup programs. This helps eliminate software conflicts that occur when you install a program or an update or when you run a program in Windows. To perform a clean boot, type "system configuration" in Search and click on the "System Configuration" result.

perform clean boot step 1

In the System Configuration window, click the "Services" tab and mark the "Hide all Microsoft services" checkbox. Then, click "Disable all".

perform clean boot step 2

Then, click the "Startup" tab and click "Open Task Manager".

perform clean boot step 3

Under the Task Manager Startup tab, select the first application and click "Disable" - disable all applications one by one, repeating this step. Once you have disabled all programs, close Task Manager and click "OK" in the System Configuration Startup tab. Then, restart your computer to see if this helps to fix the issue.

perform clean boot step 4

Your computer will run only with with default applications and services. If this helps, then one of the third-party applications is causing the error. To find that application, repeat the steps above, and enable startup services and applications one by one until you find it. You need to restart your computer after enabling the application or service to apply changes. Once you find the problematic application, you can keep it disabled, update it, reinstall it, or completely remove it from the Windows operating system.

[Back to Table of Contents]

Update Your Windows

You may wish to try this option as well - checking all Windows operating system updates might help. Some Windows components might be corrupt, and Microsoft updates for Windows are often targeted to improve this area. To check for Windows Updates, go to Settings and select "Update & Security".

update your windows step 1

You should be automatically be directed to the Windows Update section. Click "Check for updates" - Windows will start checking for updates. If there are updates available, install them and try checking for updates again (just to ensure that you have the latest updates on your operating system). Check if this helps to solve the "The action cannot be completed because the file is open in another program" error.

update your windows step 2

[Back to Table of Contents]

Empty Your Recycle Bin

This might be a solution that you have not considered - it has actually helped some people to fix the "The action cannot be completed because the file is open in another program" problem. Find "Recycle Bin" on your Desktop and right-click it. Then, select "Empty Recycle Bin" from the drop-down menu.

empty your recycle bin

Once the Recycle Bin is empty, the error message should not appear. This, however, is a one-time solution - the error might appear again once you add files to the Recycle Bin. If you want to delete your files permanently (and not to add them to the Recycle Bin) use the Shift + Delete keyboard shortcut or press and hold the Shift key while clicking the Delete option. In our experience deleting files permanently helped to fix this issue.

We hope that at least one of these solutions helps you to fix the problem, and that you can now work with files or folders without problems.

[Back to Table of Contents]

Video Showing How To Fix 'The action cannot be completed because the file is open in another program' Error:

[Back to Top]

10 Comments. Click to view

About the author:

Tomas Meskauskas

I am passionate about computer security and technology. I have an experience of 10 years working in various companies related to computer technical issue solving and Internet security. I have been working as an editor for pcrisk.com since 2010. Follow me on Twitter to stay informed about the latest tech news or online security threats. Contact Tomas Meskauskas.

Our guides are free. However, if you want to support us you can send us a donation.

About PCrisk

PCrisk logo

PCrisk is a cyber security portal, informing Internet users about the latest digital threats. Our content is provided by security experts and professional malware researchers. Read more about us.

Malware activity

Global malware activity level today:

Medium threat activity

Increased attack rate of infections detected within the last 24 hours.