GREAT TIP on deleting files in Windows 2000/XP.

JackBurton

Lifer
Jul 18, 2000
15,993
14
81
I don't know if this has been posted before, but I know there have been a few people here that have posted this problem.

Have you ever tried deleting a file in Windows XP or 2000 and get this stupid error "access denied: file in use by another program"? Well I did, and what pisses me off about Windows is that it is vauge. Hey, HOW ABOUT LETTING ME KNOW WHICH FREAKIN' PROGRAM IS USING THE FILE!!! That would be REALLY helpful. Obviously Windows knows it's in use, so how about letting me in on the other part of the puzzle (what program)! Anyway, I was trying to delete an *.avi file but it kept giving me that damn error. I tried closing all programs at start up, deleting it using the cmd prompt and going into safe mode. No go! I was getting pissed because I had a 1.5GB file just sitting there taking up space. Here is what finally took care of my problem:

First make sure it is not a system file. After you have determined it to not be a system file follow these steps:
?Close all open applications.
?Open a command prompt and navigate to the directory with the offending files.
?Then open the Task Manager and click on the Processes tab. select "explorer.exe" under Image Name. Click "End Process".
?This will leave only the command prompt and the task manager running.
?Now at the Command Prompt, its time to delete the file(s) using the DEL command. Example -- from the c:\movies directory type del movie.avi
?Now the files are deleted, go to the task manager and click on the Applications tab. Click the "New Task" button. in the dialog, type explorer.exe and click OK.

If you've never experienced this problem, make a note of this because it may come up in the future. And let me tell you, it is annoying as hell when you want to do something and Windows won't let you do it! :|

Anyway, that is my little tip. If you already know this, then you are one step ahead of me, and I'm playing catch up. :)
 

xcript

Diamond Member
Apr 3, 2003
8,258
2
81
Or, run regedit and remove the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{87D62D94-71B3-4b9a-9489-5FE6850DC73E}\InProcServer32

Apparently it prevents explorer from loading shmedia.dll in response to file property queries.. :)

Worked for me in any case.

Later.. :beer:
 

NogginBoink

Diamond Member
Feb 17, 2002
5,322
0
0
If explorer.exe is the process that has the file open, that will work.

If not, your tip is useless.

To know what process has a file open, use HandleEx from http://www.sysinternals.com. (You could use Microsoft's OH.exe, but HandleEx is better.)