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