Pages

Monday, August 23, 2010

How to delete a stubborn(undeletable) file from Windows?

HowTos
In Windows, deleting a file is just as easy as throwing a paper into dust bin. You drag the file to recycle bin, confirm the operation and poof, your file gets deleted. Emptying the recycle bin then deleted the file permanently. But it has happened with me sometimes that the file refuses to delete. It either says that it is being used by a program or says that it has been deleted or some other excuse.
Here are ways to delete such a file:



  1. If the file says that it is being used by a program, then you will need to close that program first. This is very annoying because Windows does not tell you which program is using it. So, in this case, you will have to assume yourself the program which may be using it. For this operation, right-click on task bar and select ‘Task Manager’. This will open ‘Task Manager’ window which will allow you to stop processes and services running in background. Make sure that you are currently in Processes tab. Your assumption should be based on the type of file that you are trying to delete. If the file you are trying to delete has extensions similar to docx, doc, rtf, txt etc, then you should find the programs which use them.
    image
    Image name is the generic name of process. This is very ambiguous and so, consider finding the name of program in description. Here, let us consider that a file called ‘Letter.txt’ is a stubborn file which I want to delete at any cost. Now, I know that .txt files can be opened in Notepad as well as word pad. So, My first preference should be finding ‘Notepad’ in description. After you find your program, select it and then click ‘End Process’. Try selecting the file and pressing delete button. If that works, then well and good and if it doesn’t, then restart your computer. As soon as your desktop loads, do not wait for anything and delete your file in first chance. This should work. It always works for me.
    Note:- Processes tab also contains Windows processes which if disabled may render your computer unstable. So, if you are unsure what to do, consider finding the image name of the program which you desire to delete on Google before ending the process.


  2. Sometimes, the file explorer does not allow you to delete a file. In such a case, reason is also not displayed and nothing happens if you press ‘Delete’. In this case, there might be a problem with File Explorer. So, instead of waiting for hours, do the following.
    Press Start>All Programs>Accessories>System Tools. Right click on Command Prompt and choose ‘Run as Administrator’. Then locate the path of your file by using the CD command. For instance, if my file is in ‘My Personal Letters’ folder on Desktop, your CD command should be something like this…
    Type Drive Name.. For instance C:\ then
    CD C:\
    CD “C:\Users\Manthan\Desktop\My Personal Letters\”

    Be sure to type entire path in double quotes to evade any errors. Before typing the delete command, we need to make sure that the file really exists on drive. So, since we are confirming the presence of Letters.txt, type…
    DIR L*.txt
    You’ll see something like this…
    image
    This confirms that the file is on the disk. If you do not see your file, then try refreshing the folder in which the file is in because it might have got deleted previously.
    Our case confirms that the file is presently on the disk and has not been deleted and so, type carefully…
    DEL Letter.txt
    If nothing happens and if you see something like this (below) then it means that your file has been deleted successfully.
    image


  3. Let us consider worst case in which none of the above instructions work on your computer and still your stubborn file is there, determined, on your hard drive. In this case, there might be a problem with Windows. If Windows cannot solve your problem, Linux can do it! No no, I am not telling you to install linux on your computer. Use a Live CD. Live CD allows you to use all features of linux without installing a bit of it on your PC. Instructions about using a Live CD will be given when you download it. Many Linux distributions allow you to have a live CD. I prefer Ubuntu because if its speed and simplicity. Download Live CD, run it, load (mount) Windows Hard Drive into linux file system (is done automatically), locate your file and delete it. This absolutely works no matter how stubborn your file is.
Well, these are the ways presently in my mind. If you have any further queries, kindly post it as a comment.

Ads

Look into BLOG ARCHIVE for more posts.