Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Facebook Twitter Instagram
Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Tech News Today
Home»Windows»Fix: This Action Cannot Be Completed Because the File Is Open

Fix: This Action Cannot Be Completed Because the File Is Open

SardarBy SardarFebruary 20, 2022
This-Action-Cannot-Be-Completed-Because-the-File-Is-Open-(Causes-and-Fixes)

The error “This action cannot be completed because the file is open” pops up when you’re trying to delete, more, or rename something from your hard drive. This indicates the process of the file that you’re trying to modify is running in the background and to remove the file, you must properly close the file/application. 

This error is quite common on Windows and until you’ve solved this problem, you will not be able to modify the desired file from your computer. In today’s fix, we’ll be listing a number of solutions that you can apply to troubleshoot this problem and delete the files from your computer. 

Table of Contents

  • Causes of “This Action Cannot Be Completed Because the File Is Open” Error 
  • Fixes for “This Action Cannot Be Completed Because the File Is Open” Error 
    • Close the File Through Resource Monitor
    • Restart Windows Explorer 
    • Reboot in Safe Mode 
    • Deleting Temp Files 
    • End COM Surrogate Process (For Windows 10&11 )
    • Remove/Disable Thumbnails Using Disk Clean Up 
    • Using Group Policy Editor
    • Disable the Preview panel
    • Modify the file Using Command Prompt 
    • Remove Via Anti-Virus 
    • Perform a Clean Boot 

Causes of “This Action Cannot Be Completed Because the File Is Open” Error 

The error won’t go away as long as the process using the file is not closed properly. To modify the file from your computer, you must close the application and then try to make changes to the file. If you have closed the file and the error is still popping up, here are a few common causes behind it:

  • System File
  • If you’re trying to delete a system file, you are likely to run into this issue. The system files cannot be modified on Windows straight away because while the OS is working, the files too will be in use.

    Some of such files may be modified by changing configuration via registry editor, group policy editor or elevated command prompt/ power shell.

    In order to delete, move or modify such files, the drive with OS will have to be unmounted. 

  • File in Use 
  • Even after closing some files/applications, they keep running in the background or on some other process. For instance, if there’s a movie running in the media player and you’re trying to delete the movie file, you’re likely to run into this issue. First, you’ll need to close the file properly before sending it to the recycle bin.

  • Windows Explorer Isn’t Working Properly
  • Windows explorer sometimes gets a bit messy and keeps the application running in the background. And hence, users cannot seem to modify the file. If this is the case, a fairly straightforward fix is to simply restart Windows properly.

  • Thumbnails 
  • Thumbnails in your memory cache, which are created by Windows, are also a leading cause for this issue. In such a case, deleting the cache files is required to fix the issue. Doing so would remove the thumbnails from the cache and the file/application would no longer be in use. 

  • Preview Panel
  • Strangely, the preview panel in Windows could also be a cause of this problem. If the preview panel is enabled, which is true in most cases, this error could appear. When you select a file to modify from the folder, it will show a preview on the window, making the system think that the file is already in use. Disabling the preview panel is likely to fix the issue as well. 

  • Anti-Virus Software 
  • Sometimes trying to delete a file that is marked as dangerous or is going through a scan could also lead to this issue. Before proceeding to any complex troubleshooting steps, we recommend letting the scan complete or if not running, scan the system with antivirus and try again.

    Fixes for “This Action Cannot Be Completed Because the File Is Open” Error 

    The “This action cannot be completed because the file is open” error is easy to fix and won’t take up much of your time. Here, we have listed the best possible solutions to permanently fix this issue: 

    Close the File Through Resource Monitor

    If you’re running into this error, it is most likely that the file you’re trying to modify is in use and not closed properly. Before proceeding into complex troubleshooting steps, use the resource monitor to close the file. For instance, if you’re trying to modify an ‘MS Word’ file, perform these steps:

    1. Press “Windows + R” to open Run. 
    2. Type ‘resmon’ and hit Enter.
    3. Navigate to the ‘CPU’ tab.
    4. In the search bar alongside Associated Handles input the file name you are trying to delete.
    5.  Select all the processes using the file while holding CTRL. 
    6. Right-click the selection and select ‘End Process.’
      end-process

    Now the file won’t be in use anymore and it will be closed properly. Try to modify the file and hopefully you don’t have to do anything else. If the error still persists, continue reading for more possible fixes. 

    Restart Windows Explorer 

    One of the most common culprits behind this problem is Windows explorer. It often gets glitchy and forces the Windows to run into random problems. The “This action cannot be completed because the file is open” error could also be caused by it as well. In such a scenario, the best thing is to restart Windows Explorer. To do so, follow these instructions. 

    Windows 10 

    1. Open Task Manager (Press CTRL + Shift + Esc).
    2. Click on ‘More Details.’
    3. Locate and select ‘Windows Explorer.’
    4. Right-click on ‘Windows Explorer’ and press ‘Restart.’
      windows-explorer-restart

    Windows 7 

    1. Press CTRL + Shift + Esc to open Task Manager.
    2. Click on ‘Processes.’
    3. Locate ‘Explorer.exe’ and select it.
    4. Right-click on it and select ‘End Process.’
    5. Now, click on File > New Task.
    6. Type Explorer.exe and hit Enter. 
      new-task

    Reboot in Safe Mode 

    Rebooting the system in safe mode could also be a potential fix to this problem. Using safe mode, the computer loads and runs just the basics of drivers, DLLs, and applications required to operate the system. Once you have booted in the safe mode, you’re likely to be able to modify the desired files. To boot in safe mode, follow these instructions:

    1. Press ‘Windows + R’.
    2. Type ‘msconfig’ and hit Enter.
    3. Click on the ‘Boot’ tab and check the box for ‘Safe Boot’ and click on ‘Apply.’
      safe-boot
    4. Reboot the computer and now try to modify the desired file while in safe mode.

    Deleting Temp Files 

    The temporary data stored on your hard drive could also be the culprit behind this error. While temp files are necessary to enable your system to run fast by fetching the data as per required by the application, they also are known to be notorious as they hog a lot of disk space.

    Temp files also could stay active and latch on to a process even after closing the application, causing the issue.
    Also, temp files are also a nice host for programmers to decoy their malicious source code. Cleaning temp files from time to time is highly recommended. 

    To delete the temp files, perform these steps:

    1. Press ‘Windows + R’ on your keyboard.
    2. Type %temp% and hit Enter.
    3. Press “CTRL + A” to select all the files and press “Shift + Del” to permanently delete these files. 
      delete-temp-file

    End COM Surrogate Process (For Windows 10&11 )

    COM Surrogate is a Windows extension that is responsible for handling various media items including thumbnails. It is only available on newer versions of Windows (Win10 & Win11). And this extension could also be the reason why you’re running into this error. Fortunately, users can disable this extension. To do so, perform these steps:

    1. Press ‘CTRL + Shift + Esc’ to open Task Manager.
    2. Click on ‘More Details.’
    3. Find the “COM Surrogate” process, right-click on it and press ‘End Process.’
      com-surrogate-end-task

    Remove/Disable Thumbnails Using Disk Clean Up 

    The thumbnail of the file you’re trying to use could be running in the cache and causing this problem. Fortunately, using the disk clean-up to remove the junk thumbnails will clear the file from its cache and users will be able to modify the file. To perform a disk clean up, perform these steps:

    1. Press the start button and type ‘Disk Cleanup.’
    2. Open the ‘Disk Cleanup’ application and select the drive where Windows is installed.
    3. Wait for the system to gather information, afterward, from the ‘Files to delete’ section, uncheck all the boxes except ‘Thumbnails.’
      select-files-to-delete
    4. Press ‘Ok’ and wait for the task to finish. 

    Once the task is completed, try to modify the file. Furthermore, if the error isn’t fixed, continue as below.

    Using Group Policy Editor

    Group policy editor (gpedit) is a feature of Windows available in all versions except the Home edition. However, since it is a free tool and a core component of Windows, it is integrated into all editions. 

    Windows uses group policies to manage features, functions, and permissions as well as the security of the OS. This tool, gpedit, access the policies and lets us change and set rules as per our requirements and tailor the OS for the best possible user experience.

    If you use the Home edition of Windows, copy the following in an elevated Command Prompt (CMD) and execute the command.

    FOR %F IN ("%SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~*.mum") DO (DISM /Online /NoRestart /Add-Package:"%F")
    
    FOR %F IN ("%SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~*.mum") DO (DISM /Online /NoRestart /Add-Package:"%F")

    Once gpedit has been enabled, proceed as follows.

    1. Press Windows + R
    2. Type ‘gpedit.msc’ and hit Enter. 
    3. Expand the ‘User Configuration’ folder from the editor. 
    4. Expand the Administrative Templates > Windows Components > File Explorer (Windows Explorer on Windows 7).
    5. On the right side of the window, locate and double-click on ‘’Turn off caching of thumbnails in hidden thumbs.db files.”
      Turn-off-caching-of-thumbnails-in-hidden-thumbs-db-files
    6. Check the box for ‘Enabled’, click on ‘Apply’, and close the window.
      click-on-enabled

    Disable the Preview panel

    Disabling the preview panel is a potential fix that worked for many users. Disabling this option won’t load the file in the preview window and hence, the file won’t be in use anymore. To disable the preview panel on your file explorer, perform these steps:

    1. Go to any folder.
    2. Click ‘View’ on the top of the folder and click on ‘Preview Pane’ to disable/enable it. 
      preview-pane

    Similarly, an alternative method is to open a folder and press ‘Alt + P.’

    Modify the file Using Command Prompt 

    Long before Windows, CMD was used to modify the data. And if you’re running into errors when you’re trying to modify files, using Command Prompt (CMD) is an easy fix. Here’s how you can use CMD to modify the files. 

    Delete 

    If you want to delete a specific file but are not able to do so because of the error, use CMD to delete it. Follow these steps to delete the file through CMD:

    1. Press the start button and search for ‘CMD.’
    2. Right-click on CMD and press “Run it as Administrator.”
    3. Type the drive name where the file is stored. For example, if the file is located in E drive, type, E:
    4. Now, locate the path of the file. For example, if there is a text file called ‘one’ is located inside the ‘Example’ folder, use this command to delete the file:
      Del E:\Example\one.txt
      running-del-command

    Rename 

    To rename the file on your computer using CMD, perform these steps:

    1. Open CMD with Administrator privileges.
    2. Navigate to the folder where the file is stored.
    3. Find the name of the file that you want to rename. 
    4. Afterward, type “Rename (file name) (new name)” and press Enter. 
      running-rename-command

    In this case, we changed the file name of one.txt to ones.txt:

    Remove Via Anti-Virus 

    A file that is quarantined by the anti-virus software application installed on your computer could also make Windows think that the file is in use. And hence, the “This action cannot be completed because the file is open” error will appear. It is worth a try to remove the quarantine file through Windows Defender to keep your data safe.

    See the steps below to see how you can remove the quarantined files:

    1. Go to “Settings”
    2. Click on “Update & Security.”
    3. Click on Windows Security and Select ‘Virus & Threat Protection.’
      virus-and-threat-protection
    4. Under Current threats, Select the Quarantined file.
    5. Click on Start Actions.
    6. Remove the Quarantined file. 
      current-threats-remove-threats

    Perform a Clean Boot 

    The file that you’re trying to modify could be opened in some other 3rd-party application and sometimes it is hard to tell which application is using the file. In such a case, the best fix is to disable all the non-essential applications at start-up and perform a clean boot. To perform a clean boot, follow these steps:

    1. Open Task Manager (CTRL + Shift + Esc).
    2. Navigate to the ‘Start Up’ tab and uncheck the box for all the applications except Microsoft essential services. 
      disable-third-party-applications
    3. Press ‘Apply’
    4. Reboot the computer and then try to modify the file. 
    fix
    Sardar

    A highly skilled content writer in the field of Gaming and Technology, SM Talha is a an enthusiast with nearly 4 years of churning words and a knack for writing compelling articles.

    Related Posts

    destination folder access denied

    4 Ways to Fix Destination Folder Access Denied

    May 30, 2023
    disable fullscreen optimizations

    How to Disable Fullscreen Optimizations on Windows

    May 29, 2023
    please wait for the gpsvc

    Fix: Please Wait for the GPSVC

    May 28, 2023
    0x80300024

    6 Ways to Fix 0x80300024 Error in Windows

    May 25, 2023
    check powershell version

    3 Easy Ways to Check PowerShell Version

    May 24, 2023
    d drive not showing up

    D Drive Not Showing Up—10 Ways to Fix It

    May 22, 2023
    Add A Comment

    Leave A Reply Cancel Reply

    Latest Posts
    Does-Printer-Ink-Dry-Out

    Does Printer Ink Dry Out? How to Last It Longer?

    May 30, 2023
    dmg file

    What is DMG File? How to Open It?

    May 26, 2023
    what is port 443

    Port 443: Everything You Need to Know About It

    May 18, 2023
    You may also like
    how-to-airprint-to-hp-printer

    How to AirPrint to HP Printer

    May 30, 2023
    destination folder access denied

    4 Ways to Fix Destination Folder Access Denied

    May 30, 2023
    how to change wifi password

    How to Change Wi-Fi Password? Step-by-Step Guide

    May 29, 2023
    Recommended
    Cookie Clicker Garden Guide

    Cookie Clicker Garden Guide to Unlocking Every Seed

    September 26, 2021
    monitor no signal

    Computer Turns On But Monitor Says No Signal (9 Ways To Fix)

    November 10, 2022
    Facebook Twitter Pinterest
    • Home
    • About Us
    • Our Team
    • Editorial Guidelines
    • Privacy Policy
    • Affiliate Disclosure
    © 2023 TechNewsToday, editor@technewstoday.com | Tech Central Pvt. Ltd.

    Type above and press Enter to search. Press Esc to cancel.