Howto: Delete undeletable files in Windows XP

That’s right: This is for Windows. Don’t get all huffy. I learned something new today while I was at work, and I’m going to share it. Not everything has to do with Ubuntu. Okay, most everything does, but it’s only obliquely this time.

I work on a PC that has several user accounts, and some of them are quite old — outdated is a good word for them. Some of them are two or three years old, and haven’t been used in a long time. I can tell, of course, by perusing the Documents and Settings folder. (Some people really should empty their IE cache before they log out. :shock: But that’s beside the point.)

For outdated accounts for people who have since departed, I like to delete their account folder and save space on the drive (more space for music downloaded from Jamendo! :mrgreen: ). The problem is that I occasionally get mystery files that can’t be deleted. Like this …

images[1].

See that trailing dot? I don’t know if that dot is the reason, but Windows can’t delete that file. XP complains about not being able to find the file. Explorer barfs up an error message, and even DEL from a command box (dare I call it a terminal?) can’t do it. This one has the same effect.

imagrs[1].

I don’t know where they come from or why they appear, but XP has a %@#! fit every time I try to delete them. And without that file disappearing, there’s a whole trail of encapsulating folders that don’t want to delete either. Because there’s still something in there, you see. So it can’t be deleted. :roll:

So me, being Ubuntu-minded, figured it would work just as well to boot into a Linux live CD and delete it manually. Well, except that the drive is an NTFS volume, of course. And Damn Small Linux wouldn’t do NTFS for me. And Slax suddenly refused to install to a USB key for me. And now I’m spending an hour trying to work a Windows-based Slax installer program that has been discontinued and I only found by way of the Internet Archive and it doesn’t seem to like my USB drive and my download speed for the Ubuntu live CD is 10kbps on a corporate line and even then I don’t know if I could get NTFS access off a live CD and I don’t want to install the Reconstructor on a virtual PC just to get NTFS support in a live environment. …

See where I’m at? This is way too much circumnavigation just to delete a 0Kb file.

Google a little, and I came up with this.

  1. Open a cmd box. (Start > Run > cmd)
  2. Open the Task Manager. (Right-click on the taskbar.)
  3. Kill explorer.exe. Don’t close the Task Manager.
  4. Navigate in the cmd box to the undeletable file.
  5. Delete it with DEL (I used DEL *.* for an immensely gratifying delete experience).
  6. Using the File menu in Task Manager, restart explorer.exe.

And it worked. Like a charm. So let that be a lesson to you: The best solution is not always the quickest and easiest solution. Sometimes you just have to kill Explorer.

13 Responses to “Howto: Delete undeletable files in Windows XP”


  1. 1 samosir March 31, 2007 at 8:12 pm

    I’m not huffy…. just kill Windows Explorer (and disagree for it’s license price).

  2. 2 symbolik April 1, 2007 at 4:58 am

    I got to step 5 and found that Windows worked so well at that point I just didn’t bother with step 6….

    ^____________^

  3. 3 K.Mandla April 1, 2007 at 9:51 am

    :D Funny!

  4. 4 PC Lord May 11, 2007 at 5:34 am

    Yeah you could that…or you could use unlocker or pocket killbox. Both can be googled.

  5. 5 Luke May 17, 2007 at 6:48 pm

    Btw, here is a nasty trick:

    1. kill explorer like you just said
    2. use the at command to schedule explorer.exe to be run in 1 minute
    3. wait
    4. watch explorer being open with SYSTEM privledges

    Congratulations - you now 0wn the box. :)

  6. 6 Josh August 9, 2007 at 4:06 am

    You have no idea how badly I needed this; great pointer!

    I’ve got the exact same problem with a folder that Yahoolagins (sp? - too lazy to look it up) created in our users’ home dir. For whatever reason, they won’t delete. Resetting permissions don’t work. Taking ownership doesn’t work. I was previously stuck with no option until today. Thanks again!

  7. 7 Packrat1947 September 4, 2007 at 9:57 pm

    Everyone should download the “Unlocker” - like PClord mentioned. After installation, it will be part of the right-click context menu in Windows Explorer. I happen to use both Explorer Plus and PowerDesk. Unlocker makes deleting stubborn files a breeze. When you choose Unlocker off the right-click, choose “unlock all”. That does it.

    Cheers,
    Packrat1947

  8. 8 dave November 7, 2007 at 12:30 am

    Didn’t work for me. I have a directory that ends in a trailing dot. The directory is stored on a windows machine, but I think it was created (via a share) by a mac. Anyways - stopping explorer did not help for me. Is it because I am connected to the windows box via remote desktop?

  9. 9 K.Mandla November 7, 2007 at 8:37 am

    Possibly. I’ve only ever used this method with direct access.

  10. 10 Packrat1947 December 9, 2007 at 11:56 pm

    Hi,
    Just to let everyone know - Ubuntu 7.10 live CD now has full read/write ability on ntfs. Just recently I used it to delete a very stubborn “ddccyxy.dll” file on a customer’s box.

    Moveonboot, killbox, Unlocker, and several other file delete progs. did not touch it. Even booting off a miniPE didn’t work.

    Ubuntu really didn’t delete it but moved it to a “ubuntu trash folder”. This solved my problem and the computer had to be returned asap - so I didn’t get a chance to play around any more.

    Packrat1947

  11. 11 Ajn January 20, 2008 at 1:07 pm

    Worked perfect! I was planning to boot in safe mode and delete but this is an easier solution. With explorer stopped, is there any other file navigation tool or software to use? I mean an alternative to step6.

  12. 12 PhD? May 2, 2008 at 8:21 pm

    Excellent.

  13. 13 ray May 11, 2008 at 5:57 am

    hi, good pointers. i had same issue on my xp box. all i did was share the directory and use samba on my linux box to navigate to mount the share then delete away. worked just fine. nice website btw :)

Leave a Reply




Welcome!

Most recent desktop


May 8, 2008
XFCE 4.4.2 on Crux Linux
750Mhz Celeron 128Mb PC100

Most recent game

Gnome Mahjongg on Debian 550Mhz Celeron 192Mb PC100

Be counted!

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blogs worth watching

Ubuntu Feeds

Blog Stats

  • 596,996 hits

Categories