Undeletable file
December 23, 2005 1:27 AM   Subscribe

On Windows XP, I have a problem deleting an .avi file. Please help?

It always says "another program or user is using this file", even after restart. I know it really is an .avi, as i watched it once long ago. I have other .avi files that behave normally...

Any idea how I can delete this mother, and / or why it seems to be locked like this?
posted by Meatbomb to Computers & Internet (13 answers total)
 
Maybe WhoLockMe can help? I haven't tried the utility out though. I sympathize; I despise that message—I want the damn computer to do what I tell it to!
posted by Firas at 1:30 AM on December 23, 2005


Try disabling the "indexing service to index this disk for fast file searching" in the properties of the Hard Drive.

Alternativley, there are utilities that will delete/remove a file after a reboot, during windows boot up.
posted by Akeem at 1:34 AM on December 23, 2005


Also, if push comes to shove and you need to browbeat the PC, boot using a Kanotix Linux LiveCD and open the drive in there and hit delete on the file. I mainly suggest this because I'm surprised that a restart doesn't take care of your problem.
posted by Firas at 1:35 AM on December 23, 2005


Booting in safe mode (keep hitting F8 while it's starting up, before you get to the Win XP loading screen) and then trying to delete it would be the next step I would try, and might be simpler than te above (though they're all good ideas).
posted by whir at 1:40 AM on December 23, 2005


It's because you're trying to delete it in Explorer, which tries to open the file to generate a thumbnail preview when you select it. However, if the file is slightly corrupted or malformed in some way, this fails and it leaves a handle open.

You can verify this by using Process Explorer's "search handles" function - just enter part of the filename and it will tell you the process. I bet $5 that it will show "explorer.exe".

Kill that process and delete it from the command prompt.

Then disable that god awful AVI preview bullshit.
posted by Rhomboid at 1:40 AM on December 23, 2005


Best answer: Rhomboid is correct: this is a bug in XP which is triggered by a corrupt DivX .avi file. When you go to view the file in explorer, it tries to read the entire contents of the file in order to produce a thumbnail. If the file is corrupt, the process just hangs but leaves the file "locked" so that other programs can't alter it. Apparently it is the fault of shmedia.dll, for those that are interested...

Step-by-step instructions to get rid of it:
  1. Open a Command Prompt window and leave it open. Close all open programs.
  2. Click Start, Run and enter TASKMGR.EXE
  3. Go to the Processes tab and End Process on Explorer.exe. Leave Task Manager open.
  4. Go back to the Command Prompt window and change to the directory the .avi (or other undeletable file) is located in.
  5. At the command prompt type DEL filename where filename is the file you wish to delete.
  6. Go back to Task Manager, click File, New Task and enter EXPLORER.EXE to restart the GUI shell.
  7. Close Task Manager.

posted by blag at 3:30 AM on December 23, 2005


process explorer (free) shows you which program uses/locks a certainf ile at the moment
a pretty essential winxp tool imo
posted by suni at 5:09 AM on December 23, 2005


certain file* hmpf
posted by suni at 5:11 AM on December 23, 2005


Response by poster: Thanks to all who answered... lots of easy to follow advice here.
posted by Meatbomb at 5:29 AM on December 23, 2005


You can also set Windows via a registry key so it doesn't try to read AVI files. There are a ton of links--just Google it.
posted by gramcracker at 6:04 AM on December 23, 2005


This happens to me a lot. When I delete files I usually right click them and hit delete, or I left click and drag them to the recycle bin and select move here from the pop up. Ive found that almost all the time these dont work, a simple right drag to the recycle bin works where nothing else does. Dunno why. Maybe its just my system.
posted by skrike at 11:00 AM on December 23, 2005


There's a program called MoveOnBoot that will delete a file before it has a chance to be locked by the system.
posted by Navek Rednam at 2:16 PM on December 23, 2005


I second Navek's suggestion of MoveOnBoot. I have used it numerous times for this exact problem with 100% success.
posted by sophist at 2:23 AM on March 26, 2006


« Older pendulum dowsing?   |   Favorite Xmas Tunes Newer »
This thread is closed to new comments.