Force deleting a file

Status
Not open for further replies.

mr_wizard

In Runtime
Messages
114
I get this same error message "Cannot delete file because it's either write protected or in use". Using Safe Mode or even rebooting or logging off isn't an option. Any ideas?
 
how about terminating the process thats using the file, deleting the file then launching the process again.

THere are some core parts of windows that will force a restart if you terminate them though.
 
Yeah, I have no idea which program would be using it. I have several on here running. Oh well, thanks for the help though.
 
(1) You can't delete them because they have special attributes that won't let you delete them. Do this:

Start-Run-cmd

Type:

cd\

At the c:\ prompt cd to the dir that the files are in, type the following:

attrib -r -a -s -h *.*

then try deleting all the files in that dir by typing

del /f *.*

The /f switch will force delete files with read-only attribute (just in case) The files should delete. You should do the same thing if there are any subdirectories.
 
Still gives me access is denied. This is an MPEG I downloaded from apple.com. I think I tried opening it once and it errored out. But I don't have any instances of media players running in the background. So I'm not sure what would be using this... And I can't restart because there's a password on the comp to log in that I forgot to ask the owner about. So I would have to do it without that.
 
create a text file task.txt on the C:\ root then run this command from the command line

tasklist > C:\task.txt

then copy&paste the content of the file here and we'll take a look and see what processes to kill.
 
You could make a xp boot disk and then make a batch file that says:
@echo off
cd\
cd (wherever the files are)
attrib -r -a -s -h *.*
del /f *.*
:END




Or you could delete the files yourself without the batch file.


When it is running off the boot disk, It is even better than safe mode. The files will propably delete since the os isn't using them. (it is running off the boot disk)
 
Status
Not open for further replies.
Back
Top Bottom