How do I delete "phantom files" in Windows 7?

Log in as administrator and use command line. There may be a way to fire up an administrator cmd session directly or you can use the procedure at Enable Administrator

Yeah, that’s probable, my DOS fu is a bit shaky after all these years. :wink:

there is: https://technet.microsoft.com/en-us/library/cc947813(v=ws.10).aspx

Well, back in the DOS days, you’d use a different command anyways: deltree. And, before that, you’d need to manually go through and delete all the files and folders before using rd.

FileASSASSIN from Malwarebytes will delete locked files. I’ve used it many times.

It used to be an option in Malwarebytes. Now its a separate dl.

There was a handy utility, inspired by CP/M, written by Gary Berg, called sweep.com, ca. 1984, that would traverse the entire tree from a designated starting point, repeating a command for each. You could do SWEEP DEL . to delete all files below the execution level.

As DOS went mainstream there were a metric boatload of similar utilities.

And the capability was incorporated into command.com / cmd.exe at some point as the >FOR command. I don’t remember when that happened though. Might have been as early as DOS 4, might not have happened until cmd.exe as released somewhere around Win 95 and NT.