Skip to primary, secondary, tertiary

Undeletable folder PDF Print
Monday, 04 June 2007

There is an empty folder on the computer hard drive that I created a few months ago, but now refuses to be deleted. I am aware that stubborn files and folders can be deleted through DOS, but I wanted to check whether there is an easier way to remove this folder using Windows? I have found two utilities which claim to complete this task. The first utility is Unlocker 1.8.5 by Softpedia, but after unzipping the downloaded file the .EXE file refuses to open. The second utility is called ForceDel.exe, and while I have found reviews about this utility there are no download links. Can you provide any further suggestions? The computer is running Windows XP Professional.

In the past I have also encountered “undeletable” files and folders and there are two potential causes of this issue. First, the folder name may have an illegal character in the name. Files/folders in Windows have a certain set of reserved characters, which cannot be included in the name. If one of these characters somehow gets into the name of the file/folder, the file/folder often cannot be deleted because Windows refuses to read the name of the file/folder due to the illegal character. In short, the file/folder with this name should not exist (due to the illegal name) and therefore Windows can’t read the file/folder to delete. However, you may not see any illegal characters in the file/folder name – in this case, there is likely an invisible illegal character in the name (e.g. tab space).

The second possible cause is the folder is in use and we will deal with this scenario first since it is arguably the easier to resolve. Deleting a so-called “undeletable” file through DOS is difficult when the computer is running Windows XP, as there is no easy way to boot into DOS. Likewise, because Windows XP runs the NTFS file system, you will not be able to boot from a DOS boot disk and access the hard drive. That said, we can try deleting the file using the Command Prompt in Windows XP. We first need to close any programs and processes which could be using the folder. Before completing this procedure, disconnect your computer from the internet and any other networks, as this procedure may result in security software being temporarily disabled. Then, close any programs which are running in the background, including those running in the system tray (next to the clock). Once this has been done, press CTRL-ALT-DEL to open the Task Manager. Click the “User Name” column to sort the running processes by user name (if the user name column is not visible, go to the “View” menu > “Select Columns” and tick “User Name” then click OK). Close all non-essential processes running under your user name. You should be able to close most processes except “explorer.exe” and “taskmgr.exe”. Make sure you don’t close processes running under any other user name, as those are likely to be system critical processes.

After you have closed the non-essential processes close the Task Manager. We now need to close down “explorer.exe”. This is the Windows graphical interface, which includes the desktop and taskbar. Sometimes files and folders can be caught up in explorer.exe and thus cannot be deleted, so we will need to close “explorer.exe” before attempting to delete the file. We cannot close “explorer.exe” through the Task Manager, as “explorer.exe” is an auto-spawning process, meaning that once it has been forcefully closed it will automatically start again (this is a security measure built into Windows, in case “explorer.exe” crashes). So, we need to shut down Explorer using a special procedure. Go to the “Start” menu > “Turn Off Computer”. The shutdown window will appear. Hold the key combination CTRL-SHIFT-ALT and press the “Cancel” button. This will shutdown explorer, just leaving you with a blank screen displaying the desktop wallpaper.

Once Explorer is closed, we need to open a Command Prompt window to delete the undeletable folder. Press CTRL-ALT-DEL to open the Task Manager. In the Task Manager window, go to the “File” menu > “New Task (Run...)”. Type “cmd” (without the quotes) and click OK. A Command Prompt window should appear. Close the Task Manager window.

In the Command Prompt window change to the directory which contains the folder you wish to delete. If you are not familiar with DOS commands, use the cd command to move up a directory, and the cd.. command to move down a directory. You can also list the contents of a directory using the dir command. Once you are in the directory which contains the folder you wish to delete, type the following command to remove the folder and all files within the folder:
rmdir /S /Q
Be very careful with this command, and double-check you have the correct directory. This will delete the directory and everything inside that directory! Once the command has executed (you will get no feedback, so long as no errors have appeared the command has executed properly) type exit into the Command Prompt window, to close the Command Prompt.

Finally, restart Explorer. Press CTRL-ALT-DEL to open the Task Manager, then go to “File” menu > “New Task (Run...)”. Type “explorer” (without the quotes) and click OK. Explorer should now re-load, and the undeletable folder should be deleted!

Should you be unable to delete the folder using this procedure, it seems the folder is somehow corrupted (most likely, due to an illegal naming convention). To solve this issue, we will need to use some third-party utilities. To start, let’s have a look at the two programs you have found. The first program called Unlocker 1.8.5 is not actually written by Softpedia, but that is the download mirror site where you can obtain the program. There is a possibility that since you downloaded the program from a mirror site, instead of the official site, the download file has become corrupt and that is why it does not work properly. You can download Unlocker from the official website at: http://ccollomb.free.fr/unlocker/ . Once downloaded, try running the program to see whether it works correctly. Be aware, Unlocker does not open a program – it adds itself as a shell extension. So, when you open “Start Unlocker Assistance” no window will appear on screen, but instead you will notice that an icon appears in the Windows system tray. Then, whenever you right-click on a file or folder a new option appears in the context menu titled “Unlocker”. This will inform you whether a locking handle has been found (i.e. whether the file or folder is in use). You can then select a number of options, such as unlocking the file or folder or deleting the file or folder. Additional instructions can be found on the Unlocker website at: http://ccollomb.free.fr/unlocker/ .

The second utility you found called ForceDel.exe is quite an old program written for the DOS command prompt, so it must be run from the command prompt. I managed to find the website for the writer of the software (http://www.olice.org) and you will be glad to hear he has written a new Windows version of the program called RawDelete which is also free. This can be downloaded directly from his website. Be aware, you will need to also download and install the .NET Framework Version 2.0 to use RawDelete, and the download link for the .NET Framework 2.0 is also on the website. However, this software is not likely to be beneficial in your case, as when I tried the program it seems to only allow you to delete files and not folders. However, other users who are experiencing undeletable files may find this utility useful. Be aware, the downloaded ZIP file contains the full source code to the program, as well as the compiled program. When you unzip the file, open the “Application” directory and run “Raw Delete.exe” to run the program.

Should neither of the mentioned programs be able to delete your undeletable folder, another utility I found is called Delete FXP Files (http://www.jrtwine.com/Products/DelFXPFiles/index.htm). This software is available in four versions, one of which is free. The free version does have the delete functionality enabled, so this should be able to meet your needs. Be aware, the download link is a little difficult to find on the Delete FXP Files website. You will find the download link a bit above the license types table near the bottom of the page.