WTF, can't delete an AVI file?

DaFinn

Diamond Member
Jan 24, 2002
4,725
0
0
Hmm,

I have an AVI file that I cannot delete. It just says "file is already in use"??? Even after reboot? Is something wrong with the file? Or what could be "reserving/ using" it?

Strange...
 

DaFinn

Diamond Member
Jan 24, 2002
4,725
0
0
Originally posted by: BlacKJesuS
Porn....spyware

Nope, its actually a captured video that I edited. Now I want to get rid of the original unedited file.
 
Mar 11, 2004
23,444
5,846
146
Make sure that any program you're using is closed and not running in the system tray or in the background. For instance, say you've downloaded it with something like Kazaa, and you previewed it using its media player. If you're still downloading other things, and haven't played any more clips in it, then its still using the file through its media player. So, either totally close the program or else preview another file.

Not sure if that'll help or not, but I've seen similar things happen before.
 

ronnn

Diamond Member
May 22, 2003
3,918
0
71
I have had this happen and could not even remove in safe mode. So I used move on boot, worked well.
 

DaFinn

Diamond Member
Jan 24, 2002
4,725
0
0
Tried in safe mode, no help. After some investigation, it looks like explorer is keeping it reserved (or shmedia.dll ???). Googling tells me its Windows XP "Shell Media Extension". Looks like everytime explorer loads, this thing "locks" the file somehow? This is stupid. How do I get around it?
 

beggerking

Golden Member
Jan 15, 2006
1,703
0
0
try registry edit
run->regedit
search for all instance of that file name
delete any reference to it.
 

yacoub

Golden Member
May 24, 2005
1,991
14
81
Another thing you can try is to see if it will let you rename the file. Rename it, tThen reboot and it should be deletable. Also see if it will let you change the filetype. That would make it even easier to delete on next boot.
 

DaFinn

Diamond Member
Jan 24, 2002
4,725
0
0
Moveonboot did the trick thanks. Explorer for some reason locked the file on boot, and didn't let me rename/move/delete the file. Just said file is already in use... I actually found this bit of info from virtualdub (which I use) website:

---

Ever had an AVI file that you couldn't delete, because every time you tried, you got an Access Denied or "file is already in use" error?

In Windows, it's not normally possible for a file to be locked by an application after that app exits, and very not possible for the app to have the file locked after the system has rebooted. Nine times out of ten this is caused by the Windows XP Shell Media Extension (shmedia.dll), which provides statistics and thumbnails for media files. Problem is, sometimes shmedia gets stuck on a file, and since it runs inside of Explorer, that file is effectively locked until you restart or logoff. And even that doesn't help, because after restarting, opening the folder causes it to lock the file again. Using Process Explorer from sysinternals.com is the easiest way to confirm that Explorer is holding the file open.

Deleting the file via the command-line, rather than navigating to the folder in Explorer, should work. If you're not a fan of the command-line and don't DEL the file that way, an alternative solution is to temporarily unregister shmedia.dll (regsvr32 /u shmedia.dll), restart, delete the file, and then re-register the extension (regsvr32 shmedia.dll). This is cleaner than hacking the registry to blow away the extension. I always just leave it unregistered, though, because I don't need it.

Note that there is a bad bug in older versions of VirtualDub's frameclient that can exacerbate this problem and cause it to happen for all AVI files, not just broken ones. It only happens if you have manually installed the AVIFile frameclient using auxsetup.exe and also enabled proxy mode via the proxyon.reg file; it doesn't happen if you just use VirtualDub itself, so most people won't run into this. Uninstalling the frameclient or turning off proxy mode are sufficient to fix the problem. This bug was fixed a while ago in version 1.6.0, so if you use proxy mode and are experiencing this problem, installing the frameclient from a newer version is sufficient.

---

Thanks all for your help!
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
Yeah, it's because XP tries to load a preview of the file. There are also lots of shell extensions that are executed whenever you load the context menu of the file. Another user reported his screen blinking whenever he interacted with an AVI file. Just use Killbox to delete the file.