Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Cannot delete file; may be in use". But it isn't! 2

Status
Not open for further replies.

ifx

Technical User
Feb 26, 2002
57
GB
Hi all,

I was sent an image file, but it was given the wrong extension (.jpg). I tried a couple of different file extensions to open it including .png. The problem now is that explorer seems to crash every time I browse to that folder. It's only started happening since that file was put on. I've tried deleting it but I always get the error:
"The process cannot access the file becuase it is being used by another process".

This is even after a fresh reboot and going straight through a DOS prompt as soon as getting into Windows.

Is there anyway I can find out what process is running it and stop it (though I have a suspicion it's explorer.exe), or overide the usage and delete it anyway? I've got lots of other files in that dir which can't really be moved, so I'd just like to get rid of this one file!

Any help would be great! Thanks!
Rob
 
Close all open apps. Open a command prompt (Start/Run/CMD) and navigate to the directory with the offending file(s). Then open the Task Manager and click on the Processes tab, select "explorer.exe" under Image Name. Click "End Process".

In the opened Command Prompt, DEL the offending files (DEL *.mpg, DEL mus*.avi, DEL test.wmv, etc.) Once done, go back to the task manager and click on the Applications tab. Click the "New Task..." button. in the dialog, type explorer.exe and click OK.

Note: You may have to attrib the file first.
ATTRIB -H -R -S filename before the DEL command will work.

Or you can use Process Explorer:
Use the search function to find every handle that Explorer.Exe has open and close them (right-click on the file and choose 'close handle'). Then delete the file(s) in question.

NTFS: "Access Denied" Error Message When You Try to Delete a File

Source: from the suggestions by Kelly Theriot
 
Thanks for that - logging in as administrator and using the Process Explorer let me see what was using the file so I could remove it!

Cheers!
 
what was wrong ?
i constantly got this problem, and its explorer.exe thats not releasing the handle !!!
often some directories are in there like 50-100 times
 
Bcastner:

I downloaded the freeware "DelLater" you seggested to enable me to delete two tmp files that 4.00GB in size. I try to run the program and all I get is a box with :Usage:delLater.exe<filename>.

I tried stopping Explorer.exe in the task Manager and deleting the floder that seems to have 4.0GB of .tmp files.but wih little success. Why can't I delete such a large file?

Please help,
Will
 
Dr. Deleter does nothing. It acts as if it is scheduling files to be deleted but there are still there after I reboot. What am I doing wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top