Thursday, September 07, 2006

XP How To: Empty Invisible Trash

Speaking of housecleaning.....

The other day at work, I was deleting old folders and their contents I didn't need any more on my XP Pro laptop.

I deleted the files/folders, and they went into my Recycle bin.

So far so good.

Only later, I noticed it was still displaying "full" icon.

So I emptied it again, but this time the system reported there was nothing there to delete: "Cannot delete file: cannot read from the source file or disk."

But the icon was showing full.

Hmmm. Ever had that happen?

I "explored" my Recycle bin but it didn't show any files there.

Rebooted. Nope, still showing full.

Checked my file-view settings and yes, system was set to show all system and hidden files. Not that, then.

What could it be?

I have two partitions on my laptop and the recycle bin options are set to use one bin for the entire system, and to place that recycle bin on my secondary partition. Not that big a deal.

I opened up a command-prompt (aka DOS) window.

Ran the command dir /ah (to show hidden and archived files/folders) and found the RECYCLER folder that represents the Recycle bin.

I changed directory locations to be in the RECYCLER folder:

cd recycler

Next I ran a directory list command

dir

Nothing. No files found. Apparently empty.

Then I tried the following command again to force display of any archived and/or hidden files.

dir /ah

Two files listed. Hmmm. Hidden and archived. Nice.

Next I tried the command

del (filename here)

No go. Wouldn't work. The command-line balked, it couldn't find the file even though I could see it listed.

So I ran the command:

attrib (filename here) -a -h

This was to remove the archive and hidden file attribution from each of the files. OK.

Then, again I tried from the command line

del (filename here)

The command-prompt didn't balk this time, so I flipped back to my desktop and emptied the Recycle bin. It refreshed to "empty".

So in my deleting purge, I had included two "superhidden" files that the XP Windows system couldn't show/display and that's why my Recycle bin icon remained "full" even though it wouldn't find anything to "empty".

Sometimes you will find additional <DIR> listings in there with long number/letter names. You might also have to change into one of those directories to find your "invisible" files.

Remember that, class.

Of course, if you aren't in the mood for command-line jujutsu, try Delete FXP Files from JFTWine (freeware/$). It gives you a nice GUI interface to display files and folders that use special characters or names that cannot be "normally" seen or deleted from within the "normal" Windows GUI environment.

While we are talking about deleting the "undeleteable"....

TinyApps.org posted a nice list of "Delete in-use files". I love having a couple of them handy on a USB stick or CD when I'm dealing with a particularly nasty malware removal job. My favorites are Locked Files Wizard and Unlocker. Another faithful file killer is Killbox.

Go get 'em,
--Claus

No comments: