Are you getting a “The action cannot be completed because the file is open” error while trying to rename, move, or delete a file on your Windows PC? Chances are an app or service is using your file, preventing you from deleting it. We’ll show you several ways to get around this.

Other reasons you can’t perform an action on your file include File Explorer being buggy, your antivirus restricting your access to the file, an installed app interfering with your task, and more.

Table of Contents
    How to Fix the “The action cannot be completed because the file is open” Windows Error image 1

    Close the App That’s Using Your File

    Often, you get the above file error when you try to modify a file that’s being used by an app. The app has restricted any modifications to the file, making you unable to make changes to the file.

    An easy way to get around this is to close the app using your file. You’ll then be able to make whatever changes you want to your file.

    Closing an app on Windows is as easy as selecting X in the app window’s top-right corner. If your app doesn’t quit for some reason, use Task Manager to force quit the app as follows.

    1. Right-click your taskbar (the bar at the bottom of your screen) and select Task Manager.
    2. Right-click the app that’s using your file and choose End task. This performs an “end process” task, killing the selected process.
    How to Fix the “The action cannot be completed because the file is open” Windows Error image 2
    1. Perform your intended task on your file.

    Restart Windows File Explorer

    A minor glitch in File Explorer can prevent you from making changes to your files. In this case, you can restart File Explorer, fixing any items causing you trouble.

    You can restart explorer.exe using Task Manager as follows.

    1. Launch Task Manager by right-clicking your taskbar and choosing Task Manager.
    2. Select More details and open the Processes tab. This tab displays all your CPU processes.
    3. Choose Windows Explorer on the list and select Restart in the bottom-right corner.
    How to Fix the “The action cannot be completed because the file is open” Windows Error image 3
    1. Try to make changes to your file.

    Reboot Your Windows 10/11 PC

    If restarting File Explorer didn’t resolve your issue, reboot your entire Windows system. Doing so clears your temporary storage (RAM) and relaunches all your apps and services, fixing many minor problems with the system.

    Make sure to save your unsaved work before you reboot your PC, or you risk losing it.

    1. Launch the Start menu by pressing the Windows key, then select the Power icon.
    2. Choose Restart in the menu.
    How to Fix the “The action cannot be completed because the file is open” Windows Error image 4
    1. Perform your action on your file when your PC reboots.

    Clear the Windows File Thumbnail Cache

    Windows creates and saves your files’ thumbnails, allowing you to take a quick peek at what’s inside your files. Sometimes, this thumbnail cache goes corrupt, causing various problems on your system.

    It’s a good idea to clear this cache and see if that resolves your file error. Windows will re-create this cache and show thumbnails anyway, so you aren’t losing anything.

    1. Launch the Start menu, find Disk Cleanup, and open the utility.
    2. Select your Windows installation drive and choose OK.
    3. Wait for Disk Cleanup to analyze your drive’s contents.
    4. Turn on the Thumbnails option in the Files to delete section. This deletes all your thumbs.db files.
    How to Fix the “The action cannot be completed because the file is open” Windows Error image 5
    1. Make sure to uncheck other items on the list.
    2. Select OK at the bottom.
    3. Choose Delete Files in the prompt.

    Open Folder Windows in a Separate Process

    By default, File Explorer launches your folder windows in a single process. It’s a good idea to isolate your folder windows’ processes so that one entity’s issues don’t affect others.

    1. Press Windows on your keyboard, find File Explorer Options, and choose the item on the list.
    2. Select the View tab on the open window.
    3. Turn on the Launch folder windows in a separate process option.
    How to Fix the “The action cannot be completed because the file is open” Windows Error image 6
    1. Select Apply followed by OK at the bottom.

    Turn Off Controlled Folder Access

    Your PC’s Windows Security app offers a feature that prevents unfriendly apps from making changes to your files. While your rename, move, and delete actions in File Explorer aren’t unfriendly, it’s worth toggling off this feature to see if that fixes your issue.

    1. Perform a Windows search for Windows Security and launch the app.
    2. Choose Virus & threat protection on the app window.
    3. Select Manage settings in the Virus & threat protection settings section.
    How to Fix the “The action cannot be completed because the file is open” Windows Error image 7
    1. Scroll down and choose Manage Controlled folder access.
    2. Disable the Controlled folder access option.
    How to Fix the “The action cannot be completed because the file is open” Windows Error image 8

    Unlock Your File With Unlocker

    One reason you get the “The action cannot be completed because the file is open” error is that an app has locked your file. In this case, you can use a free app called Unlocker to remove all restrictions on your file.

    You can then perform your intended actions on your file without any problems.

    1. Download and install the free Unlocker app on your PC.
    2. Double-click the newly installed app’s icon to launch the app.
    3. Navigate to the folder where your file is located, select the file, and choose OK.
    4. You can now unlock your file and make changes to it.
    5. If your file has no restrictions, you can delete, rename, or move your file from within the Unlocker app.
    How to Fix the “The action cannot be completed because the file is open” Windows Error image 9

    Clean Boot Your Windows 11/10 Operating System

    If your “The action cannot be completed because the file is open” error persists, one or more of your installed apps may be preventing your file actions. If you aren’t sure what app is causing the problem, clean boot your PC, and you should be able to isolate the culprit.

    In a clean boot environment, your PC only loads the essential system files and drivers. This isolates all your installed apps, letting you check if your apps are the source of the problem.

    1. Access the Start menu, search for msconfig, and select System Configuration on the list.
    2. Open the Services tab, select Hide all Microsoft services, choose Disable all, and select Apply.
    How to Fix the “The action cannot be completed because the file is open” Windows Error image 10
    1. Access the Startup tab and choose Open Task Manager.
    2. Select each Enabled item on the list and choose Disable at the bottom. Then, close Task Manager.
    How to Fix the “The action cannot be completed because the file is open” Windows Error image 11
    1. Select OK on the System Configuration window.
    2. Restart your PC and try to make changes to your file.

    If you can make changes to your file, one or more of your installed apps are the culprit. In this case, uninstall your recently added apps and any other suspicious apps.

    Get No Error While Trying to Make Changes to Your Files in File Explorer

    Making changes to files is a common thing all computer users do. If you ever run into a problem while doing so, consult the guide above, and your issue should be resolved.

    You can change a File Explorer option, unlock your file, or clean boot your PC to resolve your issue. Once that’s done, you can rename, move, or delete your file whenever and however you want.