K.Mandla's blog of Linux experiences

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.😯 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! ). 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.🙄

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.

Open a cmd box. (Start > Run > cmd)

Open the Task Manager. (Right-click on the taskbar.)

Kill explorer.exe. Don’t close the Task Manager.

Navigate in the cmd box to the undeletable file.

Delete it with DEL (I used DEL *.* for an immensely gratifying delete experience).

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.

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!

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.

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?

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.

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?

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.

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!

I got up to step 3..😄 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.😀

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.😐