How to delete undeletable files from a flash drive. Fixing problems with deleting a folder on a flash drive Cannot delete files from a flash drive

💖 Do you like it? Share the link with your friends

Owners of USB drives periodically need to delete some objects in order to free up space and place new files there. However, sometimes when trying to get rid of a directory, various errors occur, accompanied by a notification that this action cannot be performed. The causes of such problems can be different, respectively, for each of them there is its own solution. Next, we just want to talk about methods for correcting such difficulties.

Most often, such problems are associated with the fact that this moment the file located in the folder is being used by some process, which makes deletion impossible. In addition, all directories have access levels for different categories of users, which also affects file management. Therefore, we advise you to familiarize yourself with each common option, and only then proceed to follow the instructions.

Method 1: Disabling write protection

Flash drives with a hardware write protection function are now quite rare, but before moving on to more complex methods, we recommend checking whether such a switch is available on the media you are using. If the protection feature is enabled, you will not be able to copy or delete any files. This can be corrected by simply moving the switch in the opposite direction. You can get acquainted with its appearance by paying attention to the image below.

Method 2: Granting delete rights

As mentioned earlier, one of the most common reasons for difficulties when deleting a folder is the lack of rights to carry out such an operation. Most often, such restrictions are set manually by users, but sometimes this happens automatically. This situation can be corrected only by changing the access rights through the folder owner’s computer.

If you did not create the directory located inside the flash drive, you should also try this option, be sure to take into account all the notes that will be indicated in the following instructions.

  1. First of all, boot the operating system in safe mode so that no unnecessary processes are launched, and third-party settings that may interfere with changing rights are not activated. Read more about this operation in our separate material below.
  2. Read more: How to enter Safe Mode in Windows 7/Windows 8/Windows 10

  3. Go to section "This computer" and open the removable device.
  4. Right-click on the required folder and in context menu select "Properties".
  5. Here move to the tab "Safety".
  6. LMB select the user from whom you tried to delete the directory and look at his permissions. If all the checkboxes are next to "Prohibit", changes will need to be made.
  7. Click on the button "Change".
  8. Check the box "Allow" near "Full access" and apply the settings.
  9. However, the possible availability of special permits should not be ruled out. Check them out by going to the section "Additionally".
  10. Click on "Change permissions".
  11. Now find the element you need, select it and click on "Change".
  12. Scroll down the list. There you need to make sure that the actions associated with deletion are in the state "Allow".
  13. After applying all the changes, try getting rid of the required folder again.

If this method fails, you will still receive a notification that you do not have permission to delete the required directory. Then we recommend logging into the OS under account administrator, if this has not been done previously, and try to clear the library again.

Sometimes a user needs to completely delete data from a flash drive. For example, this is needed when the user is going to transfer the flash drive into the wrong hands or he needs to destroy confidential data - passwords, PIN codes, and so on.

Simply deleting or even formatting the device will not help in this case, since there are programs for data recovery. Therefore, it is necessary to use several programs that can completely delete information from a USB drive.

Let's consider ways complete removal information from a flash drive. We will do this in three ways.

Method 1: Eraser HDD

The Eraser HDD utility completely erases information without the possibility of recovery.



Once deleted, it will be impossible to restore the data.

Method 2: Freeraser

This utility also specializes in data destruction.

Due to its reliability and ease of use, it has gained popularity among users. To use Freeraser, do this:


Method 3: CCleaner


Method 4: Delete data multiple times

If you urgently need to get rid of data on a flash drive, but there are no specialized programs at hand, you can use the manual overwriting method: to do this, you need to delete the data several times, write down any information again, and delete it again. And do this at least 3 times. This rewriting algorithm works effectively.


In addition to the listed methods of using specialized software, there are other methods. For example, for business processes you can use special devices that allow you to destroy information without subsequent recovery.

It can literally be mounted on a flash drive. If it falls into the wrong hands, the data is automatically destroyed. The system has proven itself well "Magma II". The device destroys information using a generator of ultra-frequency waves. After exposure to such a source, the information cannot be restored, but the medium itself is suitable for further use. Externally, such a system looks like a regular case that can be used to store a flash drive. Having such a case, you can rest assured that the data on the USB drive is safe.

On Windows of any version (XP, 7, 8, 10), a problem often arises when a file or folder with a locked file is not deleted. A message pops up that the file is occupied by another process or is open in some program, or you need to ask permission from someone.

There are several ways to delete a file that is not deleted, renamed, or moved. This is done without additional software, using the free Unlocker program, from a bootable flash drive or LiveCD, or the DeadLock program.

When deleting locked files and folders, be careful; it may be part of the operating system. Without them, Windows will stop loading.

Why isn't it deleted?

  • The file is open in another program. Terminate any unnecessary processes and try again. Sometimes restarting the computer helps.
  • Insufficient permissions to delete. For example, this file was created by another user or the computer administrator removed the deletion rights.
  • Exceptions

    The methods described in the article will not always help:

    • pagefile.sys and swapfile.sys - to remove, disable the swap file.
    • hiberfil.sys - deleted when hibernation mode is disabled.
    • If an access denied message appears. You need to become the owner of the file or folder. The easiest way to do this is with the TakeOwnershipPro program.
    • If a message appears asking for permission from TrustedInstaller. This is protection against the removal of system components.
    • Windows.old - folder with old version operating system. It is deleted through the “Properties” of the local drive C. On the General tab there is a “Cleanup” button. A window will open in which select “Clear system files" After the analysis is completed, the “Previous” item will appear in the list in this window. Windows installations" Check this box and click OK.

    Deleting the file manually

    Message: The file is already in use, please close and try again.

    If a file doesn't want to be deleted, the error message usually tells you which process has locked it. This could be explorer.exe or any program that has it open. If you close this program, the file will be deleted.


    If the file is occupied by the explorer.exe process

    • Before completing the task, open Command Prompt as an administrator. It is located in “Start - All Programs - Accessories”. Right-click on Command Prompt and select Run as Administrator.
    • Remove the explorer.exe task in the task manager and write del full_path/name.extension in the command line.
    • The path does not have to be entered manually. Right click on the required file with Shift held down - Copy as a path and paste it into the command line via the right-click context menu.
    • Now restart explorer.exe. In the task manager, click "File - New task- explorer.exe."

    Use a bootable USB flash drive or disk

    If you have a bootable USB flash drive or LiveCD, or disk Windows recovery, run them and quietly delete the file standard method or via the command line.


    Be careful sometimes when entering through boot disk local disks have different letters. To see a list of folders on drive C, type dir c: on the command line.

    If you use bootable USB flash drive or Windows installation disk, the console opens at any time after the language selection stage, using the key combination Shift + F10.

    You can also select the system recovery mode, which will be offered before starting the OS installation.

    Command for deleting via the console: del full_path_to_the_file.

    Using DeadLock

    The free DeadLock program allows you to delete a locked file and change the owner. Download from the official website: https://codedead.com/?page_id=822.

    Using the File menu, add the problematic file to the program. Right-click on it in the list - unlock it (Unlock) and delete it (Remove).


    Using Unlocker

    The simplest and most popular program, but now even on the official website a warning about unwanted software is displayed. Along with the program, there may be some other virus or advertising, so use at your own peril and risk. Try the methods above first. Website: http://www.emptyloop.com/unlocker/.

    After installation, a new item will appear in the context menu, which is called Unlocker. After clicking the button, the program will complete the interfering process and the file will be unlocked.


    If you want to delete a folder, first delete all its contents.

    Via command line

    There was such a case that the file did not want to be deleted in any way. The size was 0 bytes, the name was written in Russian letters (not supported in older versions of MS-DOS), there was a Read-only attribute and an A attribute (only reading and adding content). The command line helped.


    That's all for now. If you know simpler and more effective ways, write them in the comments. Which method helped you?

In recent years, each of us has acquired at least 1 flash drive. With flash drives came viruses. In this article I will show you how to get rid of a virus that prevents you from deleting files from a flash drive.

The essence of the problem

If you delete a file from a flash drive and it is still there, or appears again. If you cannot delete a file from a flash drive and there is no delete button, then this article is for you.

Option 1 (removal using Unlocker)

To delete a file that cannot be deleted, you must first download and install the Unlocker program Unlocker1.9.2.exe (downloads: 1). This program helps in almost 95% of cases.

Now go to the flash drive (or folder) where you need to delete the file.
1) Right-click on the file you want to delete. Choose an option "Unlocker" and click on it.


2) On Windows 7 I get a message below. Click Yes .


3) In the window that appears, there will be a list of processes that prevent the file from being deleted.
You have to press "Unblock everything."




4) Again, right-click on the file that we want to delete. In the window that appears we have a choice:


  • No action
  • Delete
  • Rename
  • Move

5) Select “Delete”.


In some cases, when it is not possible to remove even using Unlocker I used the option Rename. And then Delete.

6) We delete the file and it goes to the Recycle Bin. We remove it from the Trash. All.

Option 2 (change permissions)

In the remaining 5%, when Unlocker fails, he needs help. If the file is not deleted unlocker, and at the same time you have an error like “Deleting an object is impossible, as below:

Then in this case you need to do the following:

Go to the flash drive, exactly to the root directory, i.e. you should be at the very top, like below in the picture:


After that, run my file on the flash drive by double-clicking the left mouse. After that, follow all the steps from Option 1. Now everything should work out for you. Good luck!

We give permission to change files

(If you are afraid to download files from the Internet/from my website)

To do this you need to create New File Notepad and paste the following text into it:

attrib -s -h -r /d /s




  • "attrib -s" - change All system files on ordinary
  • "attrib -h" - change All hidden files on ordinary
  • "attrib -r" - change all files "read-only" to "writable files"
  • “attrib /d” - select all files and folders
  • “attrib /s” - select all folders and subfolders

How to make file extensions visible

So that you can see that the file created in Notepad actually has the extension .bat and you did everything correctly, you need to change (or check) the settings of files and folders:

And of course the biggest difference between notepad file a and file .bat it's theirs icons:

Source

It happens that you simply need to delete a folder or file, but Windows does not allow you to do this and writes about errors like " this process busy" or "folder is not empty" or something else. Maybe you found some folder or file that you "didn't like" and want to delete it. Maybe you know for sure that this is "unnecessary junk" that only takes up space, and Windows curses and does not allow. In general, it is not so important. Why can't I delete it?, How many How to delete and in this article you will find answers to this question.

Most often, such situations occur due to the fact that the files being deleted are occupied by other programs. But it also happens that it is impossible to delete a file even after closing all applications that can use this file. For example, a file or folder may become locked due to incorrect user actions and cannot be deleted in any way. These folders (files) remain “hanging” on the hard drive, take up space, and are not opened or deleted.

The file may not be deleted due to a failure that occurred during the process of writing or overwriting it. If you interrupt the recording process, the file is not completely saved, resulting in invalid entries in file system. And our beloved Windows, not knowing how to handle it, simply closes access to it, supposedly for security reasons.

So, let's start dancing with a tambourine!

Why is the file not deleted?

1) The file was blocked by an antivirus program. This often happens when an antivirus quarantines a file. Or the antivirus detected a malicious program, but treatment was postponed (waiting for its databases to be updated). In this case, in order to avoid infecting the computer, the user is blocked from accessing this file. Check quarantine antivirus program and delete the file using the antivirus itself, or disable the antivirus and delete the file manually.

2) The file is being used by another program. Think about what programs might use this file. Close them and try deleting the file again. If this doesn't help, use Task Manager to check the process list to see if the program is still running.

3) Administrator rights are required to delete a file. If you are running under a user account, log in again as an administrator and try deleting the file.

4) The file is being used by another user local network . Please wait and try deleting the file later.

5) The file is being used by the system. Try deleting the file after restarting your computer or in safe mode.

6) The device is write protected. For example, SD memory cards and some USB flash drives have a special switch to lock the device.

There are several removal methods, I will start with the simplest and most effective ones and gradually move on to more complex ones.

1. Method:

Reboot

We programmers have a saying: “7 troubles - one reset.” You can figure out what it means yourself

But the point of the method is that you need to restart the computer and try to delete the file/folder again.

2. Method:

Safe mode

You need to log in in Safe Mode.

What is the benefit of booting the system in safe mode? The thing is that Windows does not load its libraries to execute dialogs. To put it simply, if you have a virus on your computer (and this is possible), then in this safe mode it will not perform any actions. In this mode there is nothing superfluous, just a clean OS and a person.

In order to enter this mode, when you turn on the computer and after loading the BIOS (or in general you can from the very beginning of the “black screen” boot), press the key intensively without ceasing F8(no need to press and hold!!!). A black screen will appear in which you need to use the keys on your keyboard to select Additional boot options, and then Safe Mode (or just Safe Mode, you don’t need to select all sorts of things. With support command line And so on. And so it will do) and press Enter. If you did everything correctly, the system will boot and in the lower right corner there will be an inscription Safe Mode (it may also be in all corners). Don't be afraid of the black screen that will appear) without wallpaper and beauty.

Now you need to find the file that you just couldn’t delete and try to delete it. In any case (it worked or not), reboot.

3. Method:

Through the Unlocker program

It is precisely for such purposes that the good guys wrote such a program called Unlocker. It's very small free program to unlock files running in Windows. This utility allows you to close open file blockers, thereby making it possible to perform further actions on these files. Those. the program shows all processes blocking a file (folder) and can delete it, despite all the blockers.

In addition, the program allows you to rename files and their extensions or move a locked file to another location. This is also very convenient, because... Windows does not always allow you to do this quickly and calmly.

When installing, DO NOT agree to the proposed toolbar (or you really need it, then click Next) and uncheck Install Babylon Toolbar - RECOMMENDED. Otherwise, the installation is normal - everywhere Next I Accept Install and that’s it)

Just right-click on the file that is not being deleted (not moved/renamed) in the usual way and select the program icon from the menu. A window should appear in which you select Delete from the list and press the button OK.

If the file or folder is blocked, another window will appear. First you need to press the button Unlock everything, and then Delete.

For those who don’t know what the bit depth is on the system, read

4. Method:

Through file managers

Of all the most popular and frequently used file managers the most popular is Total Commander.

File managers have the ability to bypass some Windows bans, which we will use.

To delete a non-deletable file, we will need to download one of these file managers, FAR or Total Commander (I use Total Commander Podarok Edition). After downloading and installation, find your file in the list of directories and delete it by clicking either the right mouse button and selecting Delete, or pressing the Delete key on the keyboard.

These managers also have good opportunity- see everything that is hidden and encrypted (especially in different colors, like mine). If your folder is not deleted, then go into it through the manager and see what’s there. If you see a hidden file, it means it is interfering. Then launch the Task Manager ( ctrl+shift+esc), go to the Processes tab and look for this file in the list (it’s also a good idea to click on the button at the bottom left of the Display the processes of all users manager), find and finish (del or RMB -> End process or the End process button in the lower right corner). The application is the same with files, we look for the file name and “kill”.

5. Method:

Another option with Unlocker

If your folder is not deleted, it says something like “the folder is not empty,” then create a new folder on the same disk, transfer the non-deletable folders to the new folder, delete the new folder using Unlocker

6. Method:

Using startup

Click “Start” => “Run” => In the “Run” line, enter msconfig => Click OK. You will see the System Setup window. Go to the “Startup” tab and in the list of downloadable items, find a name similar to your “not deleted” file.

If there is no such file in the list, then click on the “Disable all” button. Click on the “Apply” => “Close” button. The operating system will issue a warning that all changes made by the system setup program will take effect only after rebooting the computer. Click the "Reboot" button. The computer will restart. After downloading, try deleting the “undeletable” file again.

7. Method:

Using System Restore

In the “System Settings” window (which was the same as in the previous paragraph), select “General”. Click on the “Run System Restore” button. In the window that appears, select the option “Restore the computer to an earlier state”, click “Next”. In a new window, you will see a calendar in which you can select a system restore date. Select a date when the "not deleted" file was not on the computer. Click "Next". Don't worry, System Restore will not affect your personal files.

8. Method:

Lack of access rights to delete files

Right-click on the problematic object and select "Properties" from the drop-down list

In the window that opens, select the “Security” tab

Highlight your name in the list and select "Full Control"

- “Apply” and “OK”

Trying to delete

9. Method:

Use a different operating system.

Try booting from a removable disk (or CD/DVD) (LiveCD or LiveUSB) with another operating system. Then delete the file/folder.

10. Method:

Move somewhere.

Sometimes it helps to move (cut) the folder to an empty flash drive and then format it.

11. Method:

In the window, type the command chkdsk c: /f/r and click Enter, it should be taken into account that c: is the name of the disk that needs to be checked. If the drive you are checking has a different letter, then write it.

If the drive being checked is C:, then when you press Enter You will be prompted to check it the next time you reboot. When asked whether to check or not at the next reboot, enter Y and press Enter.

If the disk name is different, the scan will begin immediately. At the end of the check, the result of the check will appear. Type exit and click Enter.

Now you can delete a file that you did not want to delete. In the case of drive C, simply restart the computer and after checking, delete the non-deletable file.

12. Method:

If you open the command line via Start - All Programs...run the process as an administrator (RMB and Run as Administrator) and move to the folder with the non-deletable file (or folder) using the cd \ command in order to be in the root directory disk, and then cd folder_name to go to the desired folder.

tell friends