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.

About these ads

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


  1. 1 samosir 2007/03/31 at 8:12 PM

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

  2. 2 symbolik 2007/04/01 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. 4 PC Lord 2007/05/11 at 5:34 AM

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

  4. 5 Luke 2007/05/17 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. :)

  5. 6 Josh 2007/08/09 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!

  6. 7 Packrat1947 2007/09/04 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

  7. 8 dave 2007/11/07 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?

  8. 9 K.Mandla 2007/11/07 at 8:37 AM

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

  9. 10 Packrat1947 2007/12/09 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

  10. 11 Ajn 2008/01/20 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.

  11. 13 ray 2008/05/11 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 :)

  12. 14 Ewan 2008/07/20 at 9:44 PM

    Thank you! I normally use a proper operating system but I had to get rid of old Microsoft Office (would you believe it?) files that wouldn’t delete. Finally by killing explorer Windows let me delete files on the computer which I own. Who’d have thunk that the computer would tell the owner what to do eh?

  13. 15 bobwalruss 2008/08/09 at 7:16 AM

    Thanks a million! after losing a lot of sweat, this worked so easily! Had to refresh my memory though on how to navigate and delete in command prompt.

  14. 16 Scolaighe 2008/12/24 at 6:59 AM

    Great tip and nostalgic fun. Haven’t run a CMD line in way too long…

  15. 17 baba 2009/04/13 at 7:10 PM

    Thanks Buddy..worked like a charm….!

  16. 18 lee 2009/07/08 at 10:02 PM

    how can when i log in CMD it only come out C:documnet and settings \ Owner>
    but soemthings i wanna delete is in F: and it didn’t show on the screen .help me please !

    • 19 pcgeeksince84 2009/07/22 at 3:15 PM

      Change to the drive letter via by typing “F:” with out the quotes at the “C:\>documents and Settings\Owner>” or get a Command for dummies book and learn the basic 101s of MS Command . Your lucky you weren’t playing with PCs in the 80s. You would be what they call a ID-10-T error.

  17. 20 Sion 2009/09/22 at 4:42 PM

    yeah, thats sooo weird! I found a file like this, and I just couldnt delete it either…naturally, I went straight to cygwin to nuke it…but that didnt work…so I thought before I boot knoppix, and smackdown, I will google for wisdom…and you were right, I just went to dos and used DEL ?! this is a hangover from dos 3.1 why this works I can only imagine is a mistake, but it did it…many thanks!

  18. 21 Jenny 2010/01/03 at 10:46 AM

    I got up to step 3.. XD But when I’m in the box, I don’t know how to navigate to the file. Can someone tell me specifically what to type in if my undeletable file is on my desktop? And also what do you type when you delete it? Thank you very much. :D

    • 22 K.Mandla 2010/01/03 at 10:56 AM

      It’s been a long time since I did this, but I believe if you use the command box to move to your user folder, there should be a Desktop folder inside there. Sorry I can’t be of more help; perhaps another Windows user can chime in and help find that. :|

  19. 23 Jenny 2010/01/03 at 11:36 AM

    Ahh, I’ve got it. Thank you so much! :D I feel better. It was annoying the hell out of me. :T

  20. 24 ty 2010/02/25 at 12:25 AM

    hi, thank you.
    Didn’t work instantly,

    my annoying file was named 04.avi.
    cmd complained about not finding such a file, but with
    del *.
    it worked llike a charm!

  21. 25 wwizard 2010/08/13 at 1:46 AM

    thanks, worked perfectly on windows 7 with a trailing dot file stuck on my desktop

  22. 26 Snark 2011/03/09 at 12:48 PM

    Brilliant sir. I’m embarrassed that I didn’t know this trick already! Thank you… I’ve added this trick to my toolbox.

  23. 27 Prashant 2011/05/28 at 4:52 PM

    That really worked…quick and easy trick..deleted a couple of stubborn files that were just not getting deleted for several days..Thanx..

  24. 28 Tony Terry 2011/05/29 at 7:17 PM

    Thanks for that – I’ve struggled to get rid of a folder that ended with”.” for ages. Your tip and the use of “rd folder /s” sorted it, Thanks a lot.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers

License

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

Blog Stats

  • 3,960,656 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: