Skip to main content

Best Tools to Delete Stubborn Files and Directories

Sometimes a file or a directory gets locked and simply refuse to get deleted. This might happen due to several reasons. In most cases the file is in use by the operating system or by a program. Until the program relinquishes possession of the file, it cannot be deleted. Incorrect file permissions is another reason why a file may become difficult to delete. The file might be created by another user or might be marked read-only. Files with long filenames also tend to be difficult to delete.

When trying to delete such a file, Windows displays one of the following error messages:

  • Cannot delete file: Access is denied.
  • There has been a sharing violation.
  • Make sure the disk is not full or write-protected and that the file is not currently in use.
  • The source or destination file may be in use.
  • The file is in use by another program or user.

The first three error message usually indicate errors in file permissions or file attributes. In this case, it’s possible to delete the file by taking ownership of the files or by making the correct changes to the file attributes.

In case of “file in use" errors, this is more difficult as you have to identify which process is using the file and then terminate the process to free the file from its grip.

The easier way out is to use a file deletion tool.

FilExile

This is a simple program intended to delete and remove stubborn directories and files that cannot be removed by other means either because the path is too long, the name is invalid, or any of other errors that can be incurred upon file or directory deletion.

filexile

To delete a locked file, you can either right-click on the file in Windows Explorer and choose the “Delete with FilExile” option from the context menu. Or, you can open FilExile and from the simple interface click the Browse button to the open the file/browser selector dialog box.

Other features include:

  • Safety features to prevent deletion of important directories
  • Logging
  • Multi-threading
  • Command-line Arguments
  • Drag and Drop

FileASSASSIN

FileASSASSIN is a program by Malwarebytes Corporation. To delete a file, you can drag any file onto the main window of the program or browse and pick the file that you want to delete. FileASSASSIN uses techniques such as unload modules, close remote handles, and terminate processes in order to remove the particular locked file. The user can decide which file processing methods they want the program to use. Even if you are unsure, you should check all the boxes - your goal is to delete the file, anyway.

fileassassin

You can also select the Windows delete on reboot method which would delete the file upon reboot.

Unlocker

This tiny program can close handle, unload DLL files, kill processes, delete files with invalid names, delete the index.dat file and can delete files with or without reboot. Unlocker not only deletes undeletable files but also tells you why the file cannot be deleted by normal procedure.

unlocker

Simply right-click a file or folder which is locked, and select Unlocker from the context menu. You will see the processes or programs that are locking the file or folder. Then you can choose to kill or unlock the processes, with optional actions such as delete, rename, move or copy.

LockHunter

This is another resourceful program that lets you delete files and folders locked in by processes. You can access the program from its shortcut or from the Explorer context menu. Simply right-click on a file and choose “What's locking this file?”.

lockhunter

LockHunter identifies the programs that is causing the lock-in. You then have the option to either manually terminate the process or allow LockHunter to do it for you. Other functions include unloading DLL files, renaming locked files, remove locking processes from hard drive. LockHunter deletes files into the recycle bin, so you may restore them if deleted by mistake.

Comments

  1. Nice post.Another software alternative that works is "LongPathTool" for error messages: Cannot read from source file or disk, there has been a sharing violation, cannot delete file or folder, the file name you specified is not valid or too long, the source or destination file may be in use and many other file managing errors.

    ReplyDelete

Post a Comment

Popular posts from this blog

How to Record CPU and Memory Usage Over Time in Windows?

Whenever the computer is lagging or some application is taking too long to respond, we usually fire up task manager and look under the Performance tab or under Processes to check on processor utilization or the amount of free memory available. The task manager is ideal for real-time analysis of CPU and memory utilization. It even displays a short history of CPU utilization in the form of a graph. You get a small time-window, about 30 seconds or so, depending on how large the viewing area is.

How to Schedule Changes to Your Facebook Page Cover Photo

Facebook’s current layout, the so called Timeline, features a prominent, large cover photo that some people are using in a lot of different creative ways. Timeline is also available for Facebook Pages that people can use to promote their website or business or event. Although you can change the cover photo as often as you like, it’s meant to be static – something which you design and leave it for at least a few weeks or months like a redesigned website. However, there are times when you may want to change the cover photo frequently and periodically to match event dates or some special promotion that you are running or plan to run. So, here is how you can do that.

Diagram 101: Different Types of Diagrams and When To Use Them

Diagrams are a great way to visualize information and convey meaning. The problem is that there’s too many different types of diagrams, so it can be hard to know which ones you should use in any given situation. To help you out, we’ve created this diagram that lays out the 7 most common types of diagrams and when they’re best used: