Interesting

The file (folder) is not deleted. An error occurs: “Unable to delete, access denied. The file is being used by another program "

User question

Hello.

Tell me how you can delete an empty folder from your hard drive. I tried first to delete all the files from it, and then it itself - it did not work.

In principle, it does not interfere in any way: it does not take up space, there are no mistakes. It's just that when you go to see what's on the disk, sometimes I get confused and go into it ...

Hello.

Quite a typical situation, Windows often, when trying to delete a particular folder or file, can report that it is being used by another program, and that the operation cannot be performed at the moment, there is no access.

In this article I will give several ways to get out of this situation. 😉

So...

👉 Help!

1) By the way, if you are running out of space on your hard drive, I recommend that you read this article.

2) If you cannot delete files from the flash drive, check that it does not have write protection.

*

Ways to delete non-deleted files and folders

Method number 1. We deal with the "one" who does not allow deleting

The first thing I recommend to start with is to look carefully per message with an error about the impossibility of deletion: it probably indicates the program that is currently working with the file. An example is shown in the screenshot below (👇).

Error: File in use by Aimp3

If this is the case, then the solution is simple: close the programthat is currently working with the file and try deleting the file again. Alternatively, you can simply restart your computer.

*

👉 Important!

By the way, if your program is not open, and Windows still reports that this program is using a file, it is possible that the process is simply hanging (it is not always after closing the program that it completely "closes" ...).

To determine if this is the case: run Task Manager (keyboard shortcut Ctrl + Shift + Esc), open the tab annexes and see if it is there.

To close the application - right-click on it: then select the command remove the task .

Task Manager: Running Applications

I also recommend opening the tab processes and see if there is a process that Windows "talks about" in its error. Note: the process can be closed in the same way.

In some cases, however, it is impossible to recognize the application, Windows does not always report it (example below 👇). Let us analyze below what can be done with such a case ...

Error: the disk may be full or write-protected, or occupied by another application

👉 Supplement!

If an error from Windows says that you do not have access and requires permission from "TrustedInstaller" or "Systems" , check out this instruction.

*

Method number 2: uninstall in safe mode

Windows would not be such a popular system if it did not have the necessary functions and modes for debugging and tuning in its arsenal ...

The bottom line is that if you start the system in safe mode - then Windows will load only the most necessary modules, drivers and programs, without which it cannot start. So, almost certainly, the program that is using your file and blocking it will not be loaded! This means you can delete it!

I already had a large instructional article on my blog that tells how to enter Safe Mode in different Windows operating systems. In order not to repeat myself, I give a link to it below (👇).

*

👉 Help!

How to enter Safe Mode in Windows 7 ÷ 10 - see instructions

*

Actually, when you enter this mode, try to delete the treasured folder or file in the usual way (note: management and work in the system in safe mode will be the same as if you were booted in normal mode, so I will not consider working in it here).

Boot in Safe Mode / Windows 7

*

Method number 3: using the Unlocker and Lockhunter utilities

Now there are dozens of 👉 utilities for auto-unlocking a file and then deleting it (i.e. the utility will do everything for you: find the cause, fix it, and delete the file). Some of the best of their kind -Unlocker and Lockhunter (in my opinion 😉).

*

Unlocker

Developer site: //www.emptyloop.com

A small utility, after the installation of which, a link appears in the explorer, which makes it possible to delete any folders and files (even those that are not deleted in the usual way).

Even if the file is blocked, the utility may suggest deleting it at the next Windows startup, which helps in the vast majority of cases. By the way, the utility is compatible with almost all versions of Windows: 7, 8, 10, completely in Russian.

Using the utility is very simple: right-click on a non-deleting file. In the context menu, select the "Unlocker" option (with a wand).

An example of deleting a file in Unlocker

Next, the utility will analyze the file for possible blocking and offer an option to delete it. In my case, the utility offered to immediately specify your option for actions with the file (for example, delete, rename, move, etc.).

Actually, we indicate and press the "OK" button. The task is completed!

Choice of action: rename, move, delete

*

Lockhunter

Website: //lockhunter.com/

Another utility for unblocking and removing the reasons for deleting files and folders. The program is free, the tool allows you to automatically find and eliminate the reasons for blocking a file.

The utility, by the way, removes the reason for blocking even if you catch any adware or virus.

Key features:

  • shows the processes that are blocking the deleted folder or file;
  • can show detailed information about the process;
  • can delete, unlock, rename and move a file;
  • allows you to delete the file the next time you start Windows;
  • allows you to "kill" processes that are blocking a file (be careful with system processes!);
  • integrates into the explorer (can be called by the right mouse button);
  • supported by all popular Windows versions: 7, 8, 10 (32/64 bits).

Of the minuses, I would call the lack of support for the Russian language. But the utility is so simple that, perhaps, this is not a serious drawback ...

It's crazy to use: the screenshot below shows several options for actions with a non-removable file:

  • Unblock IT - unlock a file;
  • Delete IT - delete a file;
  • Other - other actions with the file: for example, rename, move, etc .;
  • Exit - close the utility.

Screenshots of LockHunter's work

*

Method number 4: get rid of the folder / file using the command line

It so happens that the explorer does not want to delete a particular file or folder. For example, it writes that there is no access, or the file is read-only, that there are no administrator rights, etc. In this case, it often helps command line .

Many users, for some reason, are afraid of it, tk. nothing is clear in it. Meanwhile, in order to work in it, you do not have to be a programmer, it is enough to copy 1-2 commands and correct it for yourself. Now I'll show you how to work in it on a couple of examples (I think you can figure it out without difficulty).

First, you need to run the command line as an administrator.

To do this, open the task manager (buttons Ctrl + Shift + Esc ), click the file / new task a, enter the command cmd and put a tick in front of the item "Create a task with administrator rights" . 👇

Run Command Prompt as Administrator

👉 Help!

How to open a command prompt in different versions of Windows - see instructions

*

Consider first deleting a folder .

Go to the desired folder that you want to delete (note that all files from the folder will also be deleted!).

Next, copy the path to this folder (just right-click and select copy).

Copy path to desired folder (explorer)

Next, on the command line, you need to write: RD / S "C: \ 111"

Where:

  • RD / s - command to remove a directory (/ s - a key to remove all files from a directory);
  • "C: \ 111" is our folder path that we copied earlier.

(Note: you can paste the copied command into the command line by right-clicking (or using the Ctrl + V keys))

Example of deleting a directory

Deleting a file

Let's say you have some kind of non-removable file. Open the explorer and go to the folder where it lies. Next, we need to open the properties of this file (just right-click on it and select properties from the menu). From them we get:

  • file name;
  • its extension (note: file extensions are not shown in Explorer by default).

We look at the properties of the file

Now you can write the command: DEL / F "C: \ 111 \ New Text Document.txt"

Where:

  • DEL / F - command for forced file deletion, including read-only ones;
  • "C: \ 111 \ New Text Document.txt" is the full path to the file.

File deleted

In general, nothing complicated. In my opinion, even a novice user will be able to "customize" the command for himself: you just need to change the path to the file. 😉

*

Method # 5: delete files and format the disk using LiveCD

A LiveCD is a special bootable CD / DVD or USB stick. Having booted from it, you do not need to install Windows OS or any programs - everything works immediately, automatically.

Thanks to this, you can carry out any manipulations with the disk: delete any files from it, edit partitions, format, etc.

The topic of creating such bootable media is quite extensive. Therefore, here is a link to my previous instructions. I recommend giving it a try.

👉 Help!

How to create a bootable LiveCD / DVD / USB-stick or disk with Windows operating system and service utilities that do not require installation on a hard drive - //ocomp.info/kak-sozdat-live-cd-fleshku.html

File delete operation / download from LiveDisk from Dr.Web

*

👉 Important!

Be careful when booting from such media. In this case, your installed Windows will not interfere with you and block the deletion of any system files, neither hidden nor read-only.

If you delete something wrong, you may have to reinstall the system ...

*

Typical questions

1) I can not delete the folder, it is written that the permission of the administrator is required. Am I not him?

By default, when installing Windows, one administrator user is created. Most PC users sit under it.

When several users work at the computer (or for the purpose of protection), several more accounts with different rights are created. If you log in under such a guest account, you are unlikely to be able to delete any files that you want.

Actually, you will see an error stating that you do not have rights, administrator rights are required, etc.

How to see what user accounts are on Windows:

  1. Press the Win + R buttons;
  2. In the window that opens, enter the command compmgmt.msc and click OK.

    compmgmt.msc - computer management

Next, a window should open computer control : in the menu on the left, select a section local users / users .

Actually, you will be presented with a list of administrators and guests on this PC.

Members

*

👉 To help!

How to get administrator rights in Windows ("the program asks for administrator rights, but I don't have them ... How to transfer my account from user to administrator")

*

In most cases, if Windows does not immediately delete the folder, it will simply ask you whether you are exactly deleting the folder, and that to delete it you need to press the button "Proceed" (administrator rights will be used, screenshot below 👇).

Continue deleting file

By the way, you can also try to delete the file using the command line by running it as administrator. How to do this is described above.

2) My folder is not deleted from the flash drive. What can be done?

  1. Try utilities Unlocker and LockHunter ... I spoke about them above in the article.
  2. You can copy everything you need from a flash drive to a disk, and then format it (formatting will delete all data from the media - be careful!). Sometimes you may need specials for formatting. utilities;
  3. See if your flash drive is write protected (some have a special lever ...);
  4. Check your flash drive for errors.

3) Folder is not deleted - could not find this item, Explorer told me. What to do?

  1. Your folder may have already been deleted. The fact is that the explorer, due to various kinds of "glitches", does not always immediately display the current state of the folder. Try restarting your PC, and then see if the folder is still there.
  2. Because Explorer does not always correctly display the path to the folder (and because of this, an error appears), try using Total Commander (or a similar commander). It also lets you quickly find a folder and delete it.

    Removal in Total Commander

4) The folder is not deleted from the desktop, although there has been nothing in it for a long time. Why?

Yes, in fact, you can act in the same way as with any other folder (examples above). Many users think that the desktop is not a folder, but something else ...

To find the Desktop folder, open the following path: C: \ Users \ Alex \ Desktop \ (it is better to do this through some commander, for example, the same Total Commander).

Where:

  1. Desktop is the desktop folder. It contains all the shortcuts to your programs, folders, files, etc.
  2. Alex is the name of your account (usually set when installing Windows).

Path to desktop / Total Commander

Actually, knowing the exact path to the folder, you can resort to uninstalling using the command line, safe mode, LiveCD, etc.

*

That's all for me, I hope you deleted your files.

If only there was no necessary among them ...

Good luck!

👣

First publication: 12.06.2017

Correction: 10/24/2019

$config[zx-auto] not found$config[zx-overlay] not found