If the file is open in Explorer, how can I delete it? A used object in Windows cannot be moved, renamed, modified, or erased. First, you need to close it and terminate the processes associated with it. Another or another option is to disable the conductor itself.
There are several ways to delete a file if it is occupied by Windows Explorer.
There are three ways to handle locked files and folder(s). However, if there is a failure, you will have an additional remedy. Brutal mode or "Force mode" will allow you to overcome the most recalcitrant files and folders. Particularly radically, this mode should be reserved for the most extreme cases.
How to Easily Launch the Command Prompt
Thanks to him, he can move faster towards the chosen ones. There are currently five blocks: “File”, “Home”, “Sent”, “View” and “Mail”. Stay on it with the right mouse button and select Add to Quick Access Toolbar. And if you want to open it as a manager, click the right arrow and select that option. When you are in this window, note that there is also a "Delete History" option here. This makes it easy to delete the list of recently visited places and panel history.
Try a few simple methods to get started.
How to delete a file that cannot be deleted - 3 ways
03/16/2016 windows |
for beginners | programs | files A common problem that novice users encounter is that a file or folder is not deleted (due to some file) that needs to be deleted. In this case, the system writes that the file is occupied by another process or the action cannot be performed because this file is open in Program_Name or that permission needs to be requested from someone. This can be encountered in any version of the OS - Windows 7, 8, Windows 10 or XP.
In fact, there are several ways to delete such files, each of which will be discussed here. Let's see how to delete a file that won't delete without using third-party tools, and then I'll describe how to delete busy files using LiveCD and the free Unlocker program. I note that deleting such files is not always safe. Be careful that it is not a system file (especially when you are told that you need permission from TrustedInstaller). See also: How to delete a file or folder if it says Element not found (this element could not be found).
Note: If the file is not being deleted because it is not in use, but with a message saying that access is denied and you need permission to perform this operation or need to request permission from the owner, then use this guide: How to take ownership of a file and folder in Windows or Request permission from TrustedInstaller (also suitable for the case when you need to request permission from Administrators).
Also, if the files pagefile.sys and swapfile.sys, hiberfil.sys are not deleted, then the methods below will not help. You will find the instructions about the Windows Page File (the first two files) or about disabling hibernation useful. Likewise, a separate article on how to delete the Windows.old folder may be useful.
Become the owner of the file
If Windows gives you an error saying you don't have permission to delete the file , then it's an ownership issue. This usually happens when Windows is updated or when you have multiple user accounts. Luckily, if you are a PC administrator, you can easily take back ownership of any file and then delete it.
Although there is a manual way to revert ownership in Windows, it is a bit complicated and error prone. That's why I personally use and recommend a third-party app called Take Ownership that can help you reclaim ownership with just one click.
Download and install the app and it will create a context menu item called “Take Ownership.” Then simply right-click on the file you want to take ownership of and select "Take Ownership" from the context menu. You will immediately take ownership and can delete or modify the file as you wish.
Deleting a file without additional programs
The file is already in use. Close the file and try again.
As a rule, if a file is not deleted, then in the message you will see which process is occupied by it - it could be explorer.exe or some other problem. It is logical to assume that in order to delete it, you need to make sure that the file is “not busy”.
This is easy to do - launch the task manager:
- In Windows 7 and XP you can access it by Ctrl + Alt + Del.
- In Windows 8 and Windows 10, you can press the Windows key + X and select Task Manager.
Find the process that is using the file you want to delete and kill the task. Delete the file. If the file is occupied by the explorer.exe process, then before canceling the task in the task manager, run the command line as an administrator and, after canceling the task, use the del full_path_to_file command in the command line to delete it.
To return to the standard desktop view after this, you need to run explorer.exe again; to do this, in the task manager, select “File” - “New task” - “explorer.exe”.
Windows Task Manager in detail
Simple universal removal method
Universal removal method
Regardless of the reason, first of all, you should use the simplest and most accessible method, which is universal. It involves performing the following actions:
- Close all active and minimized program windows.
- Restart your PC. As a result, all programs will be automatically closed, including those running in the background. In addition, in case of some failures, a regular reboot completely normalizes the system.
- Boot into safe mode. As you know, certain programs are configured to autoload - therefore, they are able to open files even before the user can perform any actions. When entering safe mode, most programs do not start, which means files do not open.
- Perform an unscheduled anti-virus scan of your computer. This procedure will be useful if access to certain files has been blocked as a result of a virus infection.
Closing active and minimized program windows
In most cases, this is enough for the system to recover, and unnecessary files can be deleted without problems. But if this does not help, you should use other specific features.
Removing a locked file using a bootable USB flash drive or disk
Another way to delete such a file is to boot from any LiveCD drive, system recovery disk, or Windows bootable USB flash drive. When using LiveCD in any of its variants, you can use either the standard Windows graphical interface (for example, in BartPE) and Linux (Ubuntu), or command line tools. Please note that when booting from such a drive, the computer's hard drives may appear under different letters. To ensure that you are deleting a file from the correct drive, you can use the dir c: command (this example will display a list of folders on the C drive).
When using a bootable USB flash drive or installation disk for Windows 7 and Windows 8, at any time during installation (after the language selection window has already loaded and in the following steps), press Shift + F10 to enter the command line. You can also select "System Restore", a link to which is also present in the installation program. Also, as in the previous case, pay attention to possible changes in drive letters.
Using DeadLock to Unlock and Delete Files
Since the Unlocker program discussed below, even from the official website, has recently (2016) begun to install various unwanted programs and is blocked by browsers and antiviruses, I propose to consider an alternative - DeadLock, which also allows you to unlock and delete files from your computer (it also promises to change the owner, but in it didn't work in my tests).
So, if when deleting a file you see a message that the action cannot be performed because the file is open in some program, then using DeadLock in the File menu you can add this file to the list, and then, using the right click - unlock it (Unlock) and remove it (Remove). You can also move the file.
The program, although in English (perhaps a Russian translation will appear soon), is very easy to use. The disadvantage (and for some, perhaps an advantage) is that, unlike Unlocker, it does not add the action of unlocking a file to the Explorer context menu. You can download DeadLock from the official website https://codedead.com/?page_id=822
Unlocker utility
If standard tools do not help, you can use a special program that will do everything for you. One of the simplest and most effective utilities is Unlocker. Download the program from the official website and install it.
A new Unlocker item has now appeared in the context menu of the file being deleted, select it. Let's try to delete the file. Even if this doesn’t work right away, we restart the computer and that’s it – the file will disappear.
Free Unlocker to unlock files that won't be deleted
The Unlocker program is probably the most popular way to delete files that are used by a particular process. The reasons for this are simple: it is free, it does its job properly, and in general, it works. You can download Unlocker for free on the developer’s official website https://www.emptyloop.com/unlocker/ (the site has recently been identified as malicious).
Using the program is very simple - after installation, just right-click on the file that is not being deleted and select “Unlocker” from the context menu. If you are using the portable version of the program, which is also available for download, launch the program and a window will open to select the file or folder you want to delete.
The essence of the program is the same as in the first described method - unloading from memory the processes that are occupied by the file. The main advantages over the first method are that using the Unlocker program it is easier to delete a file and, moreover, it can find and terminate a process that is hidden from the eyes of users, that is, not viewable through the task manager.
Update 2022: Another method, judging by the reviews, works successfully, was proposed in the comments by the author Tokha IT specialist: install and open the 7-Zip archiver (free, works also as a file manager) and rename the file in it, which is not deleted. After this, the removal is successful.
Disk check
The file may not be deleted due to errors in the hard drive. To correct the situation, the user just needs to run the scan and wait for it to complete - this is only a little longer than finding a program to remove programs that will not be removed. You can proceed to scanning your hard drive as follows:
- Open Windows Explorer, find in the list the hard drive that contains the damaged files or folders, and right-click on it, then select “Properties” from the context menu.
- In the window that opens, go to the “Service” tab.
- Select the “Check” option.
Read also: European houses (62 photos)
- And click on the “Check disk” button.
- Despite the assurances of the operating system, it will restore some of the “incorrect” entries, due to which files or directories are not deleted, without asking the user. Additionally, when checking the system disk, you may need to restart Windows.
Why is the file or folder not being deleted?
Some background information from the Microsoft site if anyone is interested. Although, the information is quite scarce. You may also find it useful: How to clear your disk of unnecessary files.
What may be preventing you from deleting a file or folder?
If you don't have the necessary system rights to change a file or folder, you can't delete it. If you didn't create the file, then chances are you can't delete it. The reason may also be settings made by the computer administrator.
Also, a file or folder containing it cannot be deleted if the file is currently open in the program. You can try closing all programs and try again.
Why when I try to delete a file does Windows say the file is in use?
This error message means that the file is being used by the program. Thus, you need to find the program that uses it and either close the file in it, if it is, for example, a document, or close the program itself. Also, if you are working online, the file may be currently in use by another user.
After deleting all files, an empty folder remains
In this case, try closing all open programs or restarting the computer, and then deleting the folder.
How to close a file opened in the system
What to do if the dialog box about the impossibility of completing the operation (the file is open in system) pops up regularly, but the system program is not displayed in the Manager. We see there only a running application - a dialog box.
How can I close or delete the file from the system in this case? There are several options here and we will consider them from simple to complex.
First of all, you need to pay attention to what kind of file you want to close and its extension. Most often this happens if we want to delete or move an image file with the .iso (or some other) extension.
The simplest thing you can do in this case is to check the virtual drives.
In one of them you will probably find a mounted file.
This will be the file opened in system. The fact is that all disks, including virtual ones, are managed by a system utility program. And while the file is in the virtual drive, if you try to perform any actions with it other than opening, a warning will be issued about the impossibility of completing the operation because the file is open in
system
.
It would seem that in this case you can right-click on the drive and Eject
file from the drive.
But this function doesn't actually work like ejecting a real disk from the drive. If we click Eject,
the file will be removed from the drive, but will remain on the system and we will still not be able to close or delete it.
But there is a simple and effective way to close a file in the system
. You just need to... restart your computer. After the reboot, check if the file has disappeared from the drive, you can perform scheduled operations. There will be no warning dialogue.
It's simple and good, but... it doesn't always work. To be more precise, this works if Automatic mounting is not checked in the settings of the program that creates virtual drives, for example, Daemon Tools .
If the checkbox is checked, then when you restart the computer, all recently mounted files will be automatically remounted.
Thus, if you want to close files opened in the system by simply restarting the computer, uncheck the box Automatic mounting
Daemon Tools
. If this does not suit you, then you can do differently.
Launching the Explorer program
You can launch the Explorer program in different ways:
1 Simply left-click on the Explorer program shortcut, which is located on the taskbar (below the desktop). The program will open.
2 Right-click on the “Start” button and select “Open Explorer”.
3 Right-click on the Explorer shortcut on the taskbar and select “Explorer”.
4 The longest path is through the Start button → All programs → Accessories.
(Click on the picture to enlarge)
how to work with an open Explorer window
How to work with an open Explorer window
The open window of the Explorer program, after launch, looks like this
(Click on the picture to enlarge)
The top line is the address line. Below is the menu bar.
Even lower is the toolbar. When you select a folder (file or disk), it shows additional options.
(Click on the picture to enlarge)
“Arrange” button – executes commands with selected folders (disks or files).
The “Open” button on the toolbar opens the selected folders or files.
On the “Sharing” button – you can change the sharing permission.
Button “Burn to optical disc” – gives a command for writing to a disc.
On the “Create Library” button, you can create a new library with your own name.
(Click on the picture to enlarge)
And then, when you launch Explorer, you will see a folder with your name in the open window.
(Click on the picture to enlarge)
However, you can always delete the library you created if it is no longer needed. To do this, click on this folder first with the left mouse button to select it, and then with the right one - a context menu will open.
From this context menu you can delete a folder, rename it, copy it, and then move the folder to another location. And you can use other functions of this menu.
the left panel of Explorer is called the tree of disks, files
The Explorer program is divided into two panels:
• the left panel is a “tree” of disks, files and folders; • on the right – the contents of the selected disk, folder.
Folders in the left pane can be opened with one click, and in the right pane with a double click.
You can customize the icons in Explorer folders either in the View menu or in the right side of the panel with the Change View icon. To the right of the icon is the “Advanced” arrow. Click and choose - large, small, medium or huge icons.
Please note that in different versions of Windows OS the open Explorer window may be slightly different. There may be a title bar on the very top panel, but nevertheless, the main executive functions are present in all versions.
Through built-in functions
You can easily get rid of an unnecessary object used in another program by using the built-in functions of the operating system. Each option should be considered in detail.
- The action cannot be performed because this file is open in System
In the "Task Manager"
Step 1. To launch it, you need to right-click on the “Taskbar” and select “Task Manager” from the menu that opens.
Right-click on the “Taskbar” and select “Task Manager”
Step 2. Next you need to follow these steps:
- In the “Applications” window, find the object of interest and go to the “Cancel task” function.
In the “Applications” window, select the object of interest and go to the “Cancel task” function - After closing the Manager, repeat the deletion process again.
Through the "Computer Management" menu
- Open the Computer Management menu. The easiest and fastest way is to right-click on the “Start” icon, and then select the appropriate option from the menu presented by left-clicking on it.
Right-click on the “Start” icon and select “Computer Management” - In the window on the left side, select “Service - Shared Folders - Open Files”.
- Open the “More actions” item and select the “Disable open files” option.
Open the “More actions” item and select the option to disable open files
After this, try again to delete the object.
Task Manager
The frozen item may not be on the taskbar. You won't see it even if it's open. But you don't need to restart your computer. Windows 7, 8 and 10 have a service where you can view and selectively disable running programs. Here's how to close a file in Explorer:
- Press Ctrl+Shift+Esc or Ctrl+Alt+Delete.
- The Task Manager will appear.
- On the Applications tab, find the item you can't get rid of or the utility associated with it.
- Highlight this item.
- Click on “Cancel task”.
- Try erasing the element that is not being deleted.
The program can be “hidden” in background processes. This means that it is not visible, but at the same time it works and is used by the system. And how to remove an item without restarting the PC? The same Task Manager will help.
- Open it and go to the "Processes" section.
- Find the application process there. Usually its name is the name of the executable file.
- Click on it and click Finish.
- If you don’t know what this program is and what it is responsible for, it’s better not to risk it. You may accidentally disable a system process.
Linux terminal commands
The instructions I described above are suitable for Windows users. Linux users can also close any application via text commands using the terminal. It is launched by pressing Ctrl + Alt + T. First you need to find out the ID of the process that you want to kill. The command ps aux | grep [NAME] or pgrep [NAME]. Then you should use the kill [ID] or pkill [ID] command. To close all windows of a program, such as a browser, at once, you can use the killall [NAME] command.
Friends, this is where I end the article. I hope you find something useful for yourself in it. I look forward to your questions and assessments of my work in the comments. Goodbye.
Close Explorer
There is no point in removing used files. You won't be able to erase them while they are active. But you don’t have to look for them in the “Dispatcher” to close them. You can disable the conductor itself. Better yet, restart it.
If you do something wrong, errors will occur. This is still a system service, not a user program. You should not close it if you plan to continue working on the computer.
Here's how to delete a file from File Explorer:
- Launch "Task Manager" (keyboard shortcut Ctrl+Shift+Esc or Ctrl+Alt+Del).
- “Processes” tab.
- Find the line "explorer.exe". Do not confuse it with “ixplere” - this is the Internet Explorer browser.
- “Explorer.exe” is a service that is responsible for Explorer in Windows 7–10. To deactivate it, click on “Finish”.
- If you disable this process, you will not be able to use the file system. You will have to restart your computer. To restart the service, go to the “File - New Task” menu and in the input field that appears, write “explorer.exe”.
- Feel free to delete what you want.
You can do it another way:
- Go to Start.
- Hold down the Ctrl+Shift keys and right-click on any free space. Not by the logo, but precisely in the area where the list of shortcuts is located.
- Select "Exit Explorer" from the context menu.
To run it:
- Press Ctrl+Shift again.
- Right-click on “Start”. This time by the icon itself, and not by the area “inside” the main menu.
- The line “Open Explorer”.
Uninstall in Safe Mode
You can also try to delete the file while the system is booted in safe mode.
In order to run it this way, you need to press the F8 button when starting the computer and select something related to safe mode from the list of options.
In most cases, it is called “Safe Mode”.
Selecting the "Safe Mode" option when booting the system
Then the process looks exactly the same as before - right-click on the file and select “Delete”.
You can try to combine this method with one of the above.
For example, when the system is loaded in safe mode, you can unlock the file through DeadLock or Unlocker, if they are installed on the computer.
Third party programs
You can unlock objects using special software. After that you can erase them. Such utilities are very easy to work with. They have a clear interface and a minimal set of options. They themselves are compact, weigh little and do not require resources. You'll quickly figure out how to close a file in Windows 7 Explorer.
DeadLock
- Find it on the Internet, download, install and run.
- You will see a window with a menu bar and an empty table. It will contain information about the selected elements.
- Command "File - Open".
- Specify the path to the object you want to erase. It will appear in the workspace of the unlocker program.
- Right-click on it.
- Select "Unblock".
- The “Status” column should read “Successfully Unblocked.”
- You can then delete the item.
Unlocker
Install this utility and it will appear in the context menu. Right-click on any icon - there will be an “Unlocker” option. When you select it, a dialog box will open. It contains the path to the file and to the program that processes it by default. If this is a music track, then there will be a media player in the “Processing” column. If this is a picture, there will be a graphic editor or image viewer.
To get rid of an object, select “Delete” in the drop-down list (bottom left). You can also move, unlock or change the name. Unlocker is free.
Before deleting a file, disable the processes associated with it. If it is open in some program, you cannot erase it. You can close it through the Task Manager or use “unlocker utilities”.
We use the "batch file"
Friends, if a certain program has seriously spoiled your nerves by constantly starting up and slowing down the system, then you can, when necessary, quickly close it through a bat file (in common parlance, a “bat file”), which must first be created. In this case, you won’t have to constantly access cmd and enter the same command ten times a day.
The body file is constructed as follows:
- Create a new text document (Notepad), by right-clicking on an empty space on the desktop, go to the New tool and select the appropriate item.
- Open the resulting document with two quick clicks and enter the command taskkill /F /IM zoom.exe into it (my name is zoom.exe, you enter the name of your problematic utility).
- Through “File”, go to the “Save As...” tool, set any name (I wrote “Close”), after it put a dot and write the bat extension (see photo).
- Click “Save” and a batch file will appear on your desktop.
When the ill-fated program starts again and boots the PC, quickly double-click on the prepared bat file to close it.